Practical - 5 - Write a program to find the area of Circle. (A = PI * r * r).

Practical - 5


Aim: Write a program to find the area of Circle. (A = PI * r * r).

 

Program:

#include <stdio.h>

#include <conio.h>

 

void main()

{

    clrscr();

    float PI = 3.14, radius, area;

 

    printf("Enter The Radius = ");

    scanf("%f", &radius);

 

    area = PI * radius * radius;

    printf("\nThe Area = %f", area);

 

    getch();

}

 

 

 

Output:

Enter The Radius = 7

 

The Area = 153.860016

 

Algorithm:

 

Step-1: START

Step-2: Declare PI = 3.14, radius, area.

Step-3: Enter the value of radius.

Step-4: area = PI * radius * radius.

Step-5: Display area.

Step-6: STOP.

 

Flowchart:




 

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.