Hi, I have written a program that calculates the area of a circle from the radius that is entered by the human. Here's the thing: The program loops until a value of 0 is entered into the console. Everything is almost working as intended, but when I enter 0 into the console, the program still attempts to write the area of the circle. Here is the code:
Neither program follows the psuedocode.
Both programs exhibit a problem at the while loop.
Radius is uninitialized the first time through the while condition.
If Radius happens to be a negative number, the loop would not execute at all.
This is why the psuedocode said to ask for a radius BEFORE the while condition.
Chriscpp's if statement is unnecessary if you follow the psuedocode.