forked from hDmtP/C-language-Tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path21-practice.c
More file actions
39 lines (30 loc) · 708 Bytes
/
21-practice.c
File metadata and controls
39 lines (30 loc) · 708 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include<stdio.h>
int main(){
int w, x, y, z;
printf("Enter w\n");
scanf("%d", &w);
printf("Enter x\n");
scanf("%d", &x);
printf("Enter y\n");
scanf("%d", &y);
printf("Enter z\n");
scanf("%d", &z);
if (w>x && w>y && w>z)
{
printf("w = %d is the greatest\n", w);
}
if (x>w && x>y && x>z)
{
printf("x = %d is the greatest\n", x);
}
if (y>x && y>x && y>z)
{
printf("y = %d is the greatest\n", y);
}
if (z>x && z>y && z>x)
{
printf("z = %d is the greatest\n", z);
}
// (w==x==y==z)? printf("w=x=y=z") : printf("all the four inputs are not same");
return 0;
}