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