C Program To Calculate Area of Circle & Rectangle

C programming ke jariye Circle aur rectangle ka area kaise find kiya jata hai , iske liye hum program write karane wale hai.

Area of circle , rectangle

Formula:
Area of circle = pir2
Area of rectangle = length * breath


/* Program for area of circle */
#include<conio.h>
#include<stdio.h>
#define pi 3.14
void main ()
{

int r;
float area;
clrscr();
printf("\n Enter radius of circle ");
scanf("%d", &r);
area = pi * r *r ;
printf ("\n Area of circle =%f", area);
getch();
}

Output:
Enter radius of circle
5
Area of circle= 78.5

Program Rectangle ka area find karane ke liye:
/* Program for area of rectangle */
#include<conio.h>
#include<stdio.h>
void main ()
{
int l,b,area;
clrscr();
printf("\n Enter Length & Breadth of rectangle ");
scanf("%d%d", &l,&b ");
area = l*b;

printf("\n Area of rectangle=%d", area);
getch();
}

Output:
Enter Length & Breadth of rectangle
15
25
Area of rectangle= 375

Aapka koi suggestion, query ho to comment ke through aap hume bata sakate hai.
Latest updates ke liye humara facebook page like kare.

Other Programs:



SHARE THIS

Author:

Completed Master Degree in Computer Science.Passionate about Blogging,Make Money and Web-Designing.Best Knowledge of HTML,PHP,.NET,C,C++ and other programming languages. Know More About Me...

0 comments: