Computer Science, asked by Aryansinghstp80, 6 months ago

write a program which accept radius from the user to calculate the
(i) diameter
(ii) circumference
(iii) area of circle​

Answers

Answered by pinkymol188
0

Answer:

#include <iostream>

#define PI 3.14159

using namespace std;

int main()

{

float radius, area, circum;

cout << "\n\n Find the area and circumference of any circle :\n";

cout << "----------------------------------------------------\n";

cout<<" Input the radius(1/2 of diameter) of a circle : ";

cin>>radius;

circum = 2*PI*radius;

area = PI*(radius*radius);

cout<<" The area of the circle is : "<< area << endl;

cout<<" The circumference of the circle is : "<< circum << endl;

cout << endl;

return 0;

Answered by BlessyThomas
0

Answer:

if in python then:

radius=int(input("Enter the radius of a circle: "))

pie=22/7

#i) diameter

diameter=radius*2

print("Diameter of the circle is : ",diameter)

#ii)circumference

circumference=diameter*pie

print("Circumference of the circle is: ", circumference)

#iii)Area of circle

area=pie*r**2

print ("Area of the circle is: ",area)

Hope it helps ☺️

Similar questions