You are on page 1of 1

1.

Write a program that takes the radius of a circle from the user and

print the area and circumference of the circle.

Sol:

#include <iostream>

using namespace std;

int main ()

float r;

cout<<"Enter the radius of triangle: ";

cin>>r;

float a=3.1416*r*r;

float c=2*3.1416*r;

cout<<"Area of Circle is: "<<a<<endl;

cout<<"Circumference of Circle is: "<<c<<endl;

You might also like