There are 3 labs in the CSE department(L1, L2, and L3) with a seating capacity of x, y, and z. Find the lab which has the minimal seating capacity.

Input and Output Format:
Assume that x, y, and z are always distinct.
Refer sample input and output.

All text in bold corresponds to the input and the rest corresponds to output.
Sample Input and Output 1:
Enter x
30
Enter y
40
Enter z
20
L3 has the minimal seating capacity

Program Code:
#include<stdio.h>
int main()
{
    int x, y, z;
    printf("Enter x\n");
    scanf("%d", &x);
    printf("Enter y\n");
    scanf("%d", &y);
    printf("Enter z\n");
    scanf("%d", &z);
    if(x<y && x<z)
    printf("L1 has the minimal seating capacity");
    if(y<x && y<z)
    printf("L2 has the minimal seating capacity");
    else
    printf("L3 has the minimal seating capacity");
    return 0;
}
Mukesh Rajput

Mukesh Rajput

I am a Computer Engineer, a small amount of the programming tips as it’s my hobby, I love to travel and meet people so little about travel, a fashion lover and love to eat food, I am investing a good time to keep the body fit so little about fitness also..

Post A Comment:

0 comments: