next up previous
Next: Even Better Idea: Functions Up: CS101 Lecture 10 Previous: Example Problem

Better Idea

Use while loop
   Do
   Read (*,*) Temp
       If ((1 <= Temp) .and. (Temp <= 100)) Exit
       Write (*,*) 'You did not type a valid input. Please try again.'
   End Do
Now write similar code for Pressure and Volume.



G. Sivakumar 2000-08-23