Program to find area and perimeter of circle depending on users choice with output

Program to find area and perimeter of circle depending on users choice with output



Program to find area and perimeter of circle depending on users choice
techee INDIA


Program: -


#include<iostream>
#include<stdlib.h>
using namespace std;
int main()
{
    system("cls");
    double radius,choice,area,perimeter;
    cout<<"\nMENU : ";
    cout<<"\n1. Area  ";
    cout<<"\n2. Perimeter  "<<"\n";
    cin>>choice;
    if(choice==1)
    {
        cout<<"\nEnter the radius of circle : ";
        cin>>radius;
        area=3.14*radius*radius;
        cout<<"\nthe area is : "<<area;
    }
    else
    {
        cout<<"\nEnter the radius of circle : ";
        cin>>radius;
        perimeter=2*3.14*radius;
        cout<<"\nthe perimeter is : "<<perimeter;
    }
    return 0;
}


Image sample: -
 


Program to find area and perimeter of circle depending on users choice
techee INDIA



Output: -



Program to find area and perimeter of circle depending on users choice
techee INDIA



Jai hind



Program to find area and perimeter of circle depending on users choice with output Program to find area and perimeter of circle depending on users choice with output Reviewed by mushrafkhan772 on July 13, 2018 Rating: 5

2 comments:

Powered by Blogger.