Hi, I'm pretty new to C programming and I'm using C-free 3.5 compiler to try a few lines of code. I usually get the error "Parse error before 'else'(for example)". What does it mean?. I get that error on lines 10 and 13 of the program below. What I was trying to do was make a program that prompts the user for 2 numbers, if the user types the same number, he has to type two numbers again. If the numbers are different, the program tells the user which number is bigger.
Perhaps I should have used "while", but I wasn't sure how to...
ThanksCode:#include <stdio.h> void main() { int a,b,max; scanf("%d %d", &a, &b); if (a == b) printf ("The value of the numbers is the same\n"); scanf("%d %d", &a, &b); else if(a<b) max = b; printf("The bigger number is: %d\n", max); else max = a; printf("The bigger number is: %d\n", max); }
Alastor