File: if_then_elseif_else.tiny

package info (click to toggle)
pyparsing 3.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 12,200 kB
  • sloc: python: 30,867; ansic: 422; sh: 112; makefile: 24
file content (17 lines) | stat: -rw-r--r-- 312 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
int main(){
    int x := 3;
    repeat
        if x = 1 then
            write "one";
        elseif x = 2 then
            write "two";
        elseif x = 3 then
            write "three";
        else
            write "other";
        end
        write endl;
        x := x-1;
    until x < 0
    return 0;
}