You need to understand "scope".
A variable is given a scope when created.
Any variables defined in a fuction have a "local scope", meaning that they are local to that function. This means that when that function ends, (unless you're using 'static', which is another topic) then the variables are destroyed, and they're gone. Poof.
Since that happens:
Code:
int GetScores (void)
{
int Score1, Score2, Score3;
printf("Intput three scores, seperated by a space,then press [Enter].");
scanf("%d %d %d", &Score1, &Score2, &Score3);
return 0;
}
When this funciton finishes, all of the 'Score' variables vanish. They're gone. Since they're gone, you can't use them in other functions.
Youre 'getgrade' function is just entirely wrong. you have to use ( ) with an if statement:
if( a < b )
Furthermore, if you are returning a letter, or rather, if you're using just one single character, and you're not using the numerical value of that character, then you must enclose it in single quotes:
return 'F';
Not:
return F; //because F could be a variable name.
The single quotes let the compiler know you're using a "character constant" and not some variable name.
Quah.