Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Problem 12 Solution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
#include <stdio.h>
int main ()
{
int a, b, c, max;
int n1, n2, n3, max;
printf ("Enter the number :");
scanf ("%d %d %d", &a, &b, &c);
if (a>=0 && a<=100000 && b>=0 && b<=100000 && c>=0 && c<=100000)
scanf ("%d %d %d", &n1, &n2, &n3);
if (n1>=0 && n1<=100000 && n2>=0 && n2<=100000 && n3>=0 && n3<=100000)
{
max=((a>b?(a>c?a:c):(b>c?b:c)));
max=((n1>n2?(n1>n3?n1:n3):(n2>n3?n2:n3)));
printf ("%d", max);
}
else
printf ("Out of range");
return 0;
}
}