Voting

Category

real language

Bookmarking

Del.icio.us Digg Diigo DZone Earthlink Google Kick.ie
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language Phrogram

Date:10/06/06
Author:Joe Maffei
URL:http://www.joemaffei.com
Comments:0
Info:http://www.phrogram.com
Score: (2.67 in 3 votes)
// 99 Bottles of Beer in Phrogram

Program BottlesOfBeer

  Method Main()

    Define word As String = " bottles"
    Define B As String = "99"
    Define n As Int = 99

    ShowConsole()

    While n >= 1

      ConsoleWriteLine(n+word+" of beer on the wall, "+n+word+" of beer.")
      n = n - 1
      B = ConvertToString(n)
      If n = 1 Then
        word = " bottle"
      End If
      If n = 0 Then
        B = "no more"
        word = " bottles"
      End If
      ConsoleWriteLine("Take one down and pass it around, "+B+word+" of beer on the wall.")
      ConsoleWriteLine("")

    End While

    ConsoleWriteLine("No more bottles of beer on the wall, no more bottles of beer.")
    ConsoleWriteLine("Go to the store and buy some more. 99 bottles of beer on the wall.")

  End Method

End Program

Download Source | Write Comment

Alternative Versions

Comments

Download Source | Write Comment

Add Comment

Please provide a value for the fields Name, Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.

Please don't post large portions of code here! Use the form to submit new examples or updates instead!

Name:

eMail:

URL:

Security Code:
  
Comment: