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

Find the generating function, Find the generating function to denote the nu...

Find the generating function to denote the number of ways the sum 9 can be acquired while 2 distinguishable fair dice are tossed and the first shows an even number and the second s

Full adder, design a FULL adder with two half adders and an or gate

design a FULL adder with two half adders and an or gate

What are called stalls, What are called stalls? An alternative represen...

What are called stalls? An alternative representation of the operation of a pipeline in the case of a cache miss gives the function performed by every pipeline stage in each cl

Explain the term- tracker ball and braille printers, Explain the term- Trac...

Explain the term- Tracker ball and Braille printers Tracker ball Easier to use than a mouse if people have problems using their arms and hands or if they have a coordinati

How to clear computer motherboard cmos password, As CMOS is a special chip ...

As CMOS is a special chip with its own battery, the best way to clear out a CMOS chip is to cut off it from its power supply. To clear the CMOS password you just take away the

What do you understand by a file system, Problem (a) What do you mean...

Problem (a) What do you meant by a file system? (b) Mention the five categories of data for a basic file system reference model. What is the use of such a reference model

Manipulating logical expressions, Digital circuits also manipulate logicale...

Digital circuits also manipulate logicalexpressione.g. IF account is in credit THEN allow phoneto make calls.So a digital circuit must determine if somethingis TRUE or FALSE. Norma

What are the necessary elements of an e-banking site, What are the necessar...

What are the necessary elements of an e-banking site? E-banking systems rely upon a number of common elements or processes. The given list comprises many of the potential elem

Differences between one hot and binary encoding, What are differences betwe...

What are differences between one hot and binary encoding? Common classifications used to explain the state encoding of an FSM is Binary or highly encoded and one hot. A bina

Determine the performance of a parallel algorithm, Q. Determine the perform...

Q. Determine the performance of a parallel algorithm? One more method of determining the performance of a parallel algorithm can be performed after calculating a parameter know

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