Write an algorithm for a program that prompts the user to enter the radius of a circle, and then calculate its perimeter
#define _USE_MATH_DEFINES
#include <cmath>
#include <iostream>
using namespace std;
int main()
{
double rad;//Radius
cout << "Please input Radius of a Circle:";
cin >> rad;
double per = rad * 2 * M_PI;
cout << "Perimetr: " << per << endl;
return 0;
}
Comments
Leave a comment