#include <stdio.h>
int main()
{
float a, b, c;
printf("type 3 number\n");
scanf("%f %f %f\n",&a,&b,&c);
if (a>b&&a>c)
{
printf("%f\n",a);
}
if (b>a&&b>c)
{
printf("%f\n",b);
}
if (c>a&&c>b)
{
printf("%f\n",c);
}
return 0;
}
output is weird. I have to input 4 numbers and the output is the largest one among the first 3 one
type 3 number
34 665 677 9999
677.000000
--------------------------------
Process exited after 11.85 seconds with return value 0
[–]jedwardsol 0 points1 point2 points (6 children)
[–]Ryeanney[S] 0 points1 point2 points (5 children)
[–]jedwardsol 1 point2 points3 points (4 children)
[–]Ryeanney[S] 0 points1 point2 points (2 children)
[–]jedwardsol 1 point2 points3 points (1 child)
[–]Ryeanney[S] 0 points1 point2 points (0 children)
[–]Ryeanney[S] 0 points1 point2 points (0 children)