+ 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?

1st Jul 2016, 11:15 AM
Yhong Amilasan
Yhong Amilasan - avatar
4 Antworten
+ 3
volume of circle =0 a circle is a 2d shape
1st Jul 2016, 11:22 AM
Mukul Kumar
Mukul Kumar - avatar
+ 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; }
4th Jul 2016, 10:10 PM
Mihai Dancaescu
Mihai Dancaescu - avatar
+ 1
I mean the code and its syntax.
1st Jul 2016, 11:30 AM
Yhong Amilasan
Yhong Amilasan - avatar
+ 1
diameter = 2 * radius. area = pi * r * r. volume = a circle doesnt have volume. maybe you are talking about a sphere?
1st Jul 2016, 11:39 AM
Garme Kain
Garme Kain - avatar