I don't understand why you are posting on this thread instead of working on the thread that you started.
Type: Posts; User: Norm
I don't understand why you are posting on this thread instead of working on the thread that you started.
Look at post#3 to see how the code is formatted.
Also note that post#3 used code tags which you have not used with your code.
Where is the print statement to ask the user to enter a number?
How is your code different from the code in post#3?
@parth31
What happens when you compile the code you posted? Are there errors?
Please test your code before posting it.
Please explain what you do and what the program does. What is printed out?
There could be many reasons why code does not work.
Are decimal points represented by a . or by a , on your computer?
Please explain what "doesn't work" means.
The code does not have any print statements to show the results or to prompt the user to enter the number.