#include"stdio.h"
int main() {
int side, area;
printf("\nEnter the Length of Side : \n");
scanf("%d", &side);
area = side * side;
printf("\nArea of Square : %d \n\n", area);
return (0);
}
Enter the Length of Side :
6
Area of Square : 36
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.