Question: Write a C Program to compute the area of a circle. Your need to prompt the user to input the radius value of a circle.

 Write a C Program to compute the area of a circle.

Write a C Program to compute the area of a circle. Your need to prompt the user to input the radius value of a circle. After reading the value, check for data validity. If you find a legitimate data, then you have to compute the area of the circle. Finally, your program requires printing both radius and area of the circle into the output. If the data is not valid print the message "Error!! Data is not valid". You need to keep iterating for a valid data to work on. [N.B. Consider Pi = 3.14159] Example Input: Key in the radius value: hello Output: Error!! Data is not valid Input: Key in the radius value: 2.5 Output: Given radius is 2.5 and the Area is 19.63 Note: Use the following area for typing the source code. You are not allowed to use any editor like DevC++ and others. For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!