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 are threads, What are threads? A thread, sometimes termed as a lig...

What are threads? A thread, sometimes termed as a lightweight process (LWP), is a fundamental unit of CPU utilization; this comprises a thread ID a register set and a stack and

Explain the language processors, Name the language processors are? Asse...

Name the language processors are? Assembler, Compiler and Interpreter are the language processors.

Show the classification of networks, There are various approaches to the cl...

There are various approaches to the classification of Computer Networks. One such classification is based on distance approach. Networks can be classified into LAN, WAN and MAN net

Result extends to functions - perceptrons, Result extends to functions - pe...

Result extends to functions - perceptrons: Thus the dotted lines can be seen as the threshold in perceptrons: whether the weighted sum, S, falls below it, after then the perce

Er diagrams, how can I draw er diagram for sell & storage section of a drug...

how can I draw er diagram for sell & storage section of a drugstore?

How codes represent data for scientific calculations?, Q. How codes represe...

Q. How codes represent data for scientific calculations? How codes are in fact used to represent data for scientific calculations? The computer is a discrete digital device

Chains of inference, Chains of Inference: Now we have to look at how t...

Chains of Inference: Now we have to look at how to get an agent to prove a given theorem using various search strategies? Thus we have noted in previous lectures that, there i

How branching takes place in instruction pipeline, How branching takes plac...

How branching takes place in Instruction pipeline. Explain with suitable examples

Explain functional roles of information system, Q. Explain Functional Roles...

Q. Explain Functional Roles of Information System? Functional Roles of Information System 1 Lower Costs - a) Use IT to significantly reduce the cost of business proce

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