Answer to Question #124370 in C++ for wilfred

Question #124370
3. Write a program that computes the area of a circular region (the shaded area in the diagram) given the radius of the inner and the outer circles, ri and ro, respectively.









We compute the area of the circular region by subtracting the area of the inner circle from the area of the outer circle.
1
Expert's answer
2020-06-29T08:24:44-0400
#include <iostream>
#include <cmath>


using namespace std;


int main(){
    double s, ri, ro;


    cout << "Input ri: "; cin >> ri;
    cout << "Output ro: "; cin >> ro;
    s = M_PI * (ro * ro - ri * ri);
    cout << "Answer: " << s;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

Assignment Expert
29.06.20, 15:45

Dear Yeboah Emmanuel the answer was published

Yeboah Emmanuel
28.06.20, 03:25

Please I need and answer to this problem

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS