Write a C program for Area and Perimeter of Rectangle
Program:-
#include <stdio.h>
#include <conio.h>
void main()
{
int a,b, A,P;
clrscr();
printf("Enter the value of a and b");
scanf("%d%d",&a,&b);
A=a*b;
P=2(a+b);
P=2(a+b);
printf("%d%d",A,P);
getch();
}
Output:-
input:-
Enter the value of a, b
a=10
b=2
Enter the value of a, b
a=10
b=2
output:-
20
24
20
24
0 comments:
Post a Comment