Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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. 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started