+ 1
please help me.
please help me asap guys.how to create a program that ask from the user the length of a given radius and output its area of circle and the volume and diameter?
4 ответов
+ 3
volume of circle =0
a circle is a 2d shape
+ 3
#include <iostream>
using namespace std;
int main()
{
int radius;
cout << "Radius: ";
cin >> radius;
cout << "\nDiameter: " << radius * 2 << "\nArea: " << radius * radius * 3.14;
return 0;
}
+ 1
I mean the code and its syntax.
+ 1
diameter = 2 * radius.
area = pi * r * r.
volume = a circle doesnt have volume.
maybe you are talking about a sphere?