<Example Program 1>
| Program ifthen_example_1 Integer x Read *, x If (Mod(x,2)==0) Then Print *, 'even',x End If End |
|
Example Input4 Execution Resultseven 4 |
|
<Example Program 2>
| Program ifthen_example_2 Integer x Read *, x If (Mod(x,2)==0) Then Print *, 'even' If (x==4) Then Print *, 'four' End If End If End |
|
Example Input 12 Execution Resultseven |
|
Example Input 24 Execution Resultseven four |
|