C Programming code to calculate area of a circle by defining pi as 3.1415
Algorithm

  1. Define pi as 3.1415 since pi is not a predefined constant in C
  2. Accept the radius of the circle
  3. Calculate the area of the circle
  4. Display the output

Code
#include<stdio.h>
#include<conio.h>
#define pi 3.1415
void main()
{
clrscr();
int r;
float a;
printf("Enter the radius of a circle. \n");
scanf("%d",&r);
a=pirr;
printf("\n Radius= %d",r);
printf(" \n Area= %f",a);
getch();
}


HameroHa

Hameroha is the official agent for this website (hameroha.com). If you want to buy/sell cars or any other properties, you can directly contact us with phone numbers available on this profile.

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *