my code doesnt work when i want to repeat again by pressing y or Y...?? | Sololearn: Learn to code for FREE!

+2

my code doesnt work when i want to repeat again by pressing y or Y...??

https://code.sololearn.com/c3CbYXO20Qxx/?ref=app

8/14/2022 1:57:01 PM

Saurabh

1 Answer

New Answer

+2

Hello. I have edited your code a bit. All i did was declare the ints before the do while loop. I have used for inputs: 4 5 - n /*And*/ 4 5 - y 5 4 - n It worked both times. The error seems to happen when you don t write y, Y or n after the inputs required for the calculator https://code.sololearn.com/c5KtsX4vepkX/?ref=app