Hi everybody,
I'm new to this forum and I don't really know to much from c programming.
So,I have this code below :
#include<iostream>
#include<cmath>
#include <string>
using namespace std;
int main(void)
{
float r;
float P;
float S;
string exit;
cout << "Give the radius value to find the perimeter and the surface of the circle!: " <<endl<<endl;
cin >>r;
P = 6.28 * r;
cout << "The Perimeter is : " << P <<endl<< endl;
S = 3.14 * r * r;
cout << "The surface is : " << S << endl << endl <<endl;
cout << "Type exit and press ENTER to exit the program" <<endl;
getline (cin, exit) >> exit;
exit;
return 0;
}
It's nothing wrong with it.I just want to know how can I make the program to repeat the procedure so it asks again the user to put a value for the radius and find the P and S again.I would really appricioate any help.