Program code (a):
#include <stdio.h>
int main()
{
int width=5;
int height=10;
int area=width*height;
printf("Area of the rectangle=%d",area);
}
Program code (b):
#include <stdio.h>
int main ()
{
int width,height,area;
printf("Enter width: ");
scanf("%d", &width);
printf("Enter Height: ");
scanf("%d",&Height);
area=width*Height;
printf("Area of the rectangle = %d",area);
}
To learn more about programming and coding visit our website. PDF study materials also available on our website.
Log on to: www.thecode11.com
