If-else

 

Here is the output of the program

Enter y for yes or n for no
n
0

Enter y for yes or n for no
y
1

----jGRASP wedge2: exit code for process is 0.
----jGRASP: operation complete.
 

 

< Java >  <Home><Java Programs>