Java Android Kotlin OOP

Wednesday, 3 January 2018

How to find area of circle in C/C++ language

To find area of circle we must know about radius of circle.We will multiply square of radius with value of PI.PI is constant and its value is 3.14.
Area of circle = PI*radius*radius

C Code




C++ Code


Working of Program:
When the above program is compiled and executed, it will ask for radius input.After user input performed value will be stored into radius variable.In the next line area of circle will be calculated and stored into area variable.And finally that calculated area will be displayed to the user.

Output:

,