Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

C++ area & circumference of a circle

	int rad;
    float area, circum;

	cout << "Input the radius(1/2 of diameter) of a circle: ";
    cin >> rad;

	area = 3.14 * rad * rad; // 3.14 * (rad * rad);
    circum = 2 * 3.14 * rad;
 
PREVIOUS NEXT
Tagged: #area #circumference #circle
ADD COMMENT
Topic
Name
9+3 =