Circumference and Area of Circle in C++

C++ Program to find the Circumference and Area of Circle

Source code :

#include <iostream>

using namespace std;

int main(){

    int radius;
    
    cout<<"Enter the radius : ";
    
    cin>>radius;
    
    cout<<"\nCircumference of Circle : "<< ( 2 * 3.14 * radius );
    
    cout<<"\nArea of Circle : "<< ( 3.14 * radius * radius ) ;
    
    return 0;

}

Output :

Enter the radius : 10
Circumference of Circle : 62.8
Area of Circle : 314

Algorithm :

  1. Get the radius from the user
  2. Calculate the Circumference using the formula 2πr
  3. Calculate the Area using the formula πr²

Output :


                

Comments :