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

Explain why the ROM is a volatile memory, Is the ROM a volatile memory? Exp...

Is the ROM a volatile memory? Explain Ans. No, ROM is a Non-Volatile memory. Programming of ROM includes making of the needed  interconnections at  the time of fabrication and

Explain clearly the kuleshov experiment, Question: (a) Write a proposal...

Question: (a) Write a proposal for a 10-11 minutes movie of your choice with the expected content. (b) Explain clearly the "Kuleshov Experiment" (c) Give the checklist be

Listening sockets, a) What command do you use to list all listening sockets...

a) What command do you use to list all listening sockets? The output should also contain the name of the program to which the socket belongs.   b) Write the command to use to

Difference between the physical drive and the logical drive., A physical dr...

A physical drive is drive the in which you can physically see in the computer system itself. That is the gadget itself. Logical drive is placed inside the physical drive and th

What is the function of the correction system, What is the function of the ...

What is the function of the correction system? The correction system handles changes to internal system components. Like as objects of the ABAP/4 Dictionary.

Explain ip address structure, Q. Explain IP Address Structure? Internet...

Q. Explain IP Address Structure? Internet addresses are divided in five types of classes. Classes were designated A through E. class A address space enables a small number of n

How sensors uses in real time process control, How sensors uses in real tim...

How sensors uses in real time process control Sensors send data (through an analogue to digital converter - ADC) to a microprocessor or computer that decides whether or not to

Draw a circuit of TTL gates with Wired-AND connection, Draw a circuit of TT...

Draw a circuit of TTL gates with Wired-AND connection and explain its operation. Wired - AND Connection In digital IC's NAND and NOR gates are most frequently used. For th

What is system prompt, Q. What is System Prompt? On loading (or Switchi...

Q. What is System Prompt? On loading (or Switching to) DOS, the screen displays C :\>, C>, A :\> or a similar message. The message displayed by DOS is called DOS Prompt or Sys

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