Sir/Ma'am,
I do not know what may be that I'm doing wrong. Logic- wise everything appears correct to me. The braces seem placed in the correct positions as well. Then why is it that I'm receiving the following error messages?
32 8 [Error] expected constructor, destructor, or type conversion before '(' token
33 2 [Error] expected unqualified-id before 'return'
34 1 [Error] expected declaration before '}' token
What am I doing wrong with this particular program? And, I was hoping for a correction using the same statements, and not any other.
Please help!
The program:
#include <stdio.h>
main()
{
int a, b, c, d, big;
printf("\n Enter value to a, b, c, d: ");
scanf("%d %d %d %d", &a, &b, &c, &d);
if (a >b)
{
if(a>c)
{
if(a>d)
big = a;
else
big=d;
}
else
{
if(c>d)
big = c;
else
big = d;
}
else
if(b>c)
{
if(b>d)
big = b;
else
big = d;
}
}
printf("\n The biggest number is %d", big);
return 0;
}