Mercurial > baum
annotate examples/sum3input.baum @ 50:0870e261bf28
added first implementation of "if" and "while" (but they are not perfect yet)
author | meillo@marmaro.de |
---|---|
date | Sun, 02 Mar 2008 15:54:35 +0100 |
parents | 96e2d58bc346 |
children | 6e46b106c334 |
rev | line source |
---|---|
19 | 1 # example program for baum |
2 # http://prog.marmaro.de/baum | |
39
96e2d58bc346
added new example program; added comments to example programs
meillo@marmaro.de
parents:
19
diff
changeset
|
3 # |
96e2d58bc346
added new example program; added comments to example programs
meillo@marmaro.de
parents:
19
diff
changeset
|
4 # asks the user to input 3 numbers |
96e2d58bc346
added new example program; added comments to example programs
meillo@marmaro.de
parents:
19
diff
changeset
|
5 # then prints the sum of them |
96e2d58bc346
added new example program; added comments to example programs
meillo@marmaro.de
parents:
19
diff
changeset
|
6 # and returns the sum to the shell |
96e2d58bc346
added new example program; added comments to example programs
meillo@marmaro.de
parents:
19
diff
changeset
|
7 # |
96e2d58bc346
added new example program; added comments to example programs
meillo@marmaro.de
parents:
19
diff
changeset
|
8 # Attention: expect number overflow! |
19 | 9 |
10 print(0) | |
11 sum(0) | |
12 input(0) | |
13 input(0) | |
14 input(0) |