C Practice Problems For Beginners-5
Problem Statement:-Write a C program to calculate area of rectangle.
Code:-
#include<stdio.h>
#include<conio.h>
void main()
{
int area, h, w;
printf("Enter height of rectangle:- ");
scanf("%d", &h);
printf("Enter width of rectangle:- ");
scanf("%d", &w);
area=h*w;
printf("Area Of Rectangle:- %d", area);
getch();
}
Output:-
0 Comments