Joined: 25 Sep 2016
|Posted: Sun Oct 02, 2016 1:39 am Post subject:
|There seems to be an exception though, whenever I run an .exe file that ask the user if they want to use the program again, the program runs normally.
Integer :: n, m
11 Print*, "Please input a number"
m = 0
o = 1
z = n-1
Do i=1, z
t = m + o
m = o
o = t
write (*,*) 'Program has finished; prompt to exit'
12 Print*, "Do you want to use the program again? enter 1 for yes and 2 for no"
!If user input values other than 1 and 2 then input error
If (ans > 2 .or. ans < 0 ) Then
!Else send then back to the start
Else If (ans == 1) then
Go TO 11
Print*, "Thank you for using my program!! :)"
End program Fibonacci