This is program that I shown my previous post. Now I just write a program where I want to calculate the area of a rectangle.
Program Code:
#include<stdio.h>
int main(void)
{
int length, width;
printf("\n Please Enter Your Length: ");
scanf("%d", &length);
printf("\n Please Enter Your Width: ");
scanf("%d", &width);
printf("\n Your Area is: %d \n", length * width);
return 0;
}
[N.B: We know that "Area = (Length x Width)" just do that here, nothing else ]
Output |
No comments:
Post a Comment