Print area of a rectangle in C
printf() - Question 15
In this question, we will see how to print the area of a rectangle in C programming using the printf() function. To know more about printf() function click on the printf() function lesson.
Q15) Write a program in C to find the area of a rectangle if length is 10 and breadth is 5.
Formula: area = length * breadth
Program
#include <stdio.h>
#include <conio.h>
int main()
{
printf("Length=10\n");
printf("Breadth=5\n");
printf("Area=%d",10*5);
return 0;
}
Output
Length=10 Breadth=5 Area=50