so I just started out with C a couple days ago, and I was just messing around with functions and function calls and what not. And I'm getting an error when compiling this:
Code:
#include <stdio.h>
void myFunction(void);
int main () {
int value1;
printf("What is 15 multiplyed by 2?\n");
scanf("%d", &value1);
if(value1 == 30) {
printf("That is correct");
myFunction();
}
else {
printf("That is incorrect. Try again.");
return main();
}
void myFunction(void); {
char yn;
printf("Would you like another question? y/n");
scanf("%c", &yn);
}
}
I'm just testing it, I know the second part is completely pointless and doesn't do anything at the moment.
NEVER MIND, realised the closing bracket for main was after myFunction.