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 KPL (Kid's Programming Language)

Date:10/06/06
Author:Joe Maffei
URL:http://www.joemaffei.com
Comments:4
Info:http://www.kidsprogramminglanguage.com
Score: (2.44 in 9 votes)
// 99 Bottles of Beer in KPL (Kid's Programming Language)

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

>>  red said on 10/07/07 10:38:45

red Wow, this ridiculously over-complicated syntax is sure to turn kids away from programming for sure.

>>  Joe Maffei said on 07/21/08 07:47:44

Joe Maffei Really? What syntax are you commenting on, the language's or my program's? In either case, I think KPL is a lot like Basic, which has been known to appealed to kids... well, 80's kids anyway.

>>  JR said on 07/29/08 19:50:49

JR Hi... can you send me a copy of KPL soft(win setup)...I know it's out... but I need a copy of the program...if you have it... please ... I apreciate that !!

JR.

>>  DonaBlanchard25 said on 06/22/10 01:45:38

DonaBlanchard25 That's well known that money makes us disembarrass. But what to do if somebody does not have money? The only one way is to try to get the <a href="http://lowest-rate-loans.com/topics/business-loans">business loans</a> and auto loan.

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: