Hi ,
One more thing that u can do is to use while loop and check for r being negative while(r>0) if so get the input from user and print the values of are a nad perimeter.
By the way ur area would...