Question
Write a program to calculate the cost of a circular steel plate, which has to be cut from a square piece of steel. The diameter
Write a program to calculate the cost of a circular steel plate, which has to be cut from a square piece of steel. The diameter of the circle is equal to the side of the square. The program should read in: the radius of the circle, r; the cost per square centimetre of steel plate in Euro, c; and the wastage refund rate, wr (expressed as a percentage of the cost, c). In other words, the waste can be returned to the supplier for the wastage refund rate percentage, wr, of the cost, c. Assume PI = 3.1415. You have to check that input values are positive. See the example below for the input as well as the expected output.
For example: *Test Input 2 3 20 Result: The cost of the circular plate is 45.94 Euro
Test input for negative values -1 10 0 Result: Input values must be positive Please post a code for c program.
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