Question
This is Fotran Code program test implicit none integer :: x,y print*,enter first number x read*,x print*,enter second number y read*,y if(x>y) then print*,x, x
This is Fotran Code
program test implicit none integer :: x,y print*,"enter first number x" read*,x print*,"enter second number y" read*,y if(x>y) then print*,x," x large number " else if(y>x) then print*,y,"y larger number" else print*,"two numbers are equal" end if
end program test
Need to modify this program so it runs within a loop that prompts the user whether to continue at the end of each iteration and does another if the user enters y or Y.
(Need to look something like this ) Enter two real numbers: 3.4 5.6 The larger number was 5.59999990 Do Another (y/n)? y Enter two real numbers: 4.5 4.5 The two numbers were both 4.50000000 Do Another (y/n)? Y Enter two real numbers: -88, 11 The larger number was 11.0000000 Do Another (y/n)? n
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started