MCPcopy Create free account
hub / github.com/Rustam-Z/cpp-programming / main

Function main

Lab_01/07_circle.cpp:7–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5using namespace std;
6
7int main()
8{
9 cout << "\t\tC++ program to Calculate Area and Circumference of Circle.\n";
10 float R, Area, Circumference;
11 cout << "Please enter the Radius of Circle: ";
12 cin >> R;
13
14 if (R > 0) {
15 Area = 3.14 * R * R;
16 Circumference = 2 * 3.14 * R;
17 cout << "Area of Circle is " << Area << ";" << endl;
18 cout << "Circumference of Circle is " << Circumference << ";" << endl;
19 }
20 else {
21 cout << "Negative numbers cannot be applied !!!" << endl;
22 }
23
24 system("pause");
25 return 0;
26}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected