Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Just do programming assignement number 7 its a program where you type in the rad

ID: 3546542 • Letter: J

Question

Just do programming assignement number 7

its a program where you type in the radius and the output is the cirumference and area of the circle.


Except there is a certain way I need it done... click this link for further instructions! http://i.imgur.com/bYMjb4c.jpg

Just do programming assignement number 7 its a program where you type in the radius and the output is the cirumference and area of the circle. Except there is a certain way I need it done... click this link for further instructions! http://i.imgur.com/bYMjb4c.jpg

Explanation / Answer

#include<iostream>
using namespace std;

void Banner(){
cout<<"++++++++++++++ WELCOME TO CIRCLE +++++++++++++++"<<endl;
}
void GetValue(float *radius){
float r;
cout<<"Enter value for radius : ";
cin>>r;
*radius =r;
cout<<endl;

}


float ComputeCircumference(float *radius){
float cir;
cir= 2*3.14*(*radius);
return cir;

}

void ComputeArea(float *radius,float *area){
float ar;
ar= 3.14*(*radius)*(*radius);
*area=ar;

}

void OutputData(float *radius,float circumference,float *area){
cout<<"Radius of circle is "<<*radius<<endl;
cout<<"Circumference of circle is "<<circumference<<endl;
cout<<"Area of circle is "<<*area<<endl;
}

bool GoAgain(){
cout<<"Want to continue press '1' ";
int i=0;
cin>>i;
if(i==1)
return true;
return false;
}

int main(){
float *radius,*area;
float circumference=1;
*radius=1;
*area=1;
Banner();
do{
GetValue(radius);
circumference=ComputeCircumference(radius);
ComputeArea(radius,area);
OutputData(radius,circumference,area);

}while(GoAgain());

return 0;
}


// please check now new post