We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 55d881b + d54cf54 commit 39e8aefCopy full SHA for 39e8aef
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