We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c5c05c2 commit d54cf54Copy full SHA for d54cf54
GREATER NO.
@@ -0,0 +1,19 @@
1
+int main() {
2
+ double n1, n2, n3;
3
+ printf("Enter three different numbers: ");
4
+ scanf("%lf %lf %lf", &n1, &n2, &n3);
5
+
6
+ // if n1 is greater than both n2 and n3, n1 is the largest
7
+ if (n1 >= n2 && n1 >= n3)
8
+ printf("%.2f is the largest number.", n1);
9
10
+ // if n2 is greater than both n1 and n3, n2 is the largest
11
+ if (n2 >= n1 && n2 >= n3)
12
+ printf("%.2f is the largest number.", n2);
13
14
+ // if n3 is greater than both n1 and n2, n3 is the largest
15
+ if (n3 >= n1 && n3 >= n2)
16
+ printf("%.2f is the largest number.", n3);
17
18
+ return 0;
19
+}
0 commit comments