Write a program to find the area and perimeter of a circle, Computer Engineering

Assignment Help:

Write a program to find the area and perimeter of a circle of given radius

# include

void main()

{

float radius, area, perimeter, pi=3.14;

printf("\nEnter the radius of the circle :\>");

scanf("%f",&radius);

area=pi*radius*radius; 

/* Area of a circle=Pr2*/

perimeter=2*pi*radius;

/* Area of a circle=2Pr*/ printf("\nThe area of the circle is :%.2f",area);

printf("\nThe perimeter of the circle is :%.2f\n",perimeter);

/* "%.2f" - prints values upto 2 decimal places*/

getch();

}

 


Related Discussions:- Write a program to find the area and perimeter of a circle

What is a digital comparator, What is a digital comparator? Ans: ...

What is a digital comparator? Ans: Digital Comparator: The comparison of two numbers is an operation which evaluates if one number is greater than, less than, or equival

IEEE802, 1. (a) Given a baseband bus with station 1 located at 10m, station...

1. (a) Given a baseband bus with station 1 located at 10m, station 2 located at 1000m, and station 3 located at 1010 meters (see diagram above). If the data rate of the bus is 10 M

CRTscreen as a two-dimensional matrix, Explain the statement- CRT screen as...

Explain the statement- CRT screen as a two-dimensional matrix One can imagine the CRT screen as a two-dimensional matrix which has m rows and n  columns and this is usually ref

Webforms application and to an mvc application, What is the difference amon...

What is the difference among adding routes, to a webforms application and to an mvc application? Ans) To add routes to a webforms application, we use MapPageRoute() process of

System requirements for chip design, The Peripheral interface chip system r...

The Peripheral interface chip system requires the construction of the interface chip circuit, which is controlled by main micro-controller via the user interface. I also need set

What is processor time of a program, What is processor time of a program? ...

What is processor time of a program? The periods during which the processor is active is known as processor time of a program it depends on the hardware included in the executi

What is the role of mar and mdr, What is the role of MAR and MDR? The ...

What is the role of MAR and MDR? The MAR (memory address register) is used to hold the address of the location to or from which data are to be transferred and the MDR(memory d

Define parsing, Define Parsing Parsing is the method of analyzing a te...

Define Parsing Parsing is the method of analyzing a text, made up of a sequence of tokens, to define its grammatical structure with respect to a given formal grammar. Parsing

Computer science, Read in integers until a zero is read in. Keep a total o...

Read in integers until a zero is read in. Keep a total of both the quantity and the sum of the negative integers and the positive integers. Once a zero is read in (signifying the

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd