diff --git a/Lab_01/07_circle.cpp b/Lab_01/07_circle.cpp index 5d68352..1515f75 100644 --- a/Lab_01/07_circle.cpp +++ b/Lab_01/07_circle.cpp @@ -1,6 +1,7 @@ // C++ program to Calculate Area and Circumference of Circle. #include +#define PI 3.14 using namespace std; @@ -12,8 +13,8 @@ int main() cin >> R; if (R > 0) { - Area = 3.14 * R * R; - Circumference = 2 * 3.14 * R; + Area = PI * R * R; + Circumference = 2 * PI * R; cout << "Area of Circle is " << Area << ";" << endl; cout << "Circumference of Circle is " << Circumference << ";" << endl; } @@ -23,4 +24,4 @@ int main() system("pause"); return 0; -} \ No newline at end of file +}