#include"stdio.h"
int main() {
int length, breadth, area;
printf("\nEnter the Length of Rectangle : \n");
scanf("%d", &length);
printf("\nEnter the Breadth of Rectangle : \n");
scanf("%d", &breadth);
area = length * breadth;
printf("\nArea of Rectangle : %d \n\n", area);
return (0);
}
Enter the Length of Rectangle :
6
Enter the Breadth of Rectangle :
7
Area of Rectangle : 42
Press any key to continue . . .
First understand the algorithm carefully. Then study the program line-by-line and compare it with the output. Finally, review the explanation section to strengthen your logic and programming understanding.
Rewrite the program without looking at the code. Modify values, conditions or logic and run it again. This helps improve confidence and strengthens coding skills much faster.