#include<stdio.h>
void main()
{
int l,b;
printf("Enter length and breadth of room:");
scanf("%d %d", &l, &b);
if(l==b)
{
printf("\nLength and breadth of room is equal");
printf("\nThis is a square room");
}
else
{
printf("\nLength and breadth of room is not equal");
printf("\nThis is a rectangular room");
}
}
Here, parantheses is used because two statements are there in the body of if and else.
0 Comments