C++ program to calculate the area and circumference of a circle
kw.cpp
#include<iostream>usingnamespacestd;#define PI 3.141592654
intmain(){floatR;cout<<"———————————————————————————————————————————";cout<<"\nProgram to calculate the area and circumference of a circle";cout<<"\n———————————————————————————————————————————";cout<<"\nEnter the radius of a circle ";cin>>R;cout<<"\nThe area of a circle is "<<PI*R*R;cout<<"\nThe circumference of a circle is "<<2*PI*R;cout<<"\n———————————————————————————————————————————\n";return0;}
Output
kodingwindow@kw:~$ g++ kw.cpp kodingwindow@kw:~$ ./a.out
———————————————————————————————————————————
Program to calculate the area and circumference of a circle
———————————————————————————————————————————
Enter the radius of a circle 10
The area of a circle is 314.159
The circumference of a circle is 62.8319
———————————————————————————————————————————
kodingwindow@kw:~$
Dear User, Thank you for visitng Kodingwindow. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.
Dear User, We are grateful for your interest in the Kodingwindow Android app. We intend to soon make it available on the Google Play Store. Currently, Android versions 10 and up require manual apk installations. Would you like to get the app?