<Example Program 1>
| Program ifthen_example_1 Integer x Read *, x If (Mod(x,2)==0) Then Print *, 'even',x End If End | |
|  Example Input 4  Execution Results even 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 1 2  Execution Results even | |
|  Example Input 2 4  Execution Results even four | |