#Hey there so im relatively new to C programming and im having some trouble here with 'C'

8 messages ยท Page 1 of 1 (latest)

soft beaconBOT
#

@red sinew

๐•ฒ๐–๐–”๐–˜๐–™๐–Š๐–‰ ๐•ฏ๐–Š๐–‘๐–™๐–† Uploaded Some Code

So ideally this is supposed to display accepted or not accepted depending on the math or english grade as you can see but it keeps outputting not accepted regardless and help would be appreciated

Uploaded these files to a Gist
#

@red sinew

๐•ฒ๐–๐–”๐–˜๐–™๐–Š๐–‰ ๐•ฏ๐–Š๐–‘๐–™๐–† Uploaded Some Code
Uploaded these files to a Gist
#

@red sinew

๐•ฒ๐–๐–”๐–˜๐–™๐–Š๐–‰ ๐•ฏ๐–Š๐–‘๐–™๐–† Uploaded Some Code
Uploaded these files to a Gist
teal thorn
#

Are you checking the input to the acceptance function?

#
printf("age: %d, subjects_passed: %d, math_grade: %d, english_grade %d", age, subjects_passed, math_grade, english_grade);
#

Also probably best to pass the student struct itself to the acceptance function.

#
if (age >= 16 && subjects_passed >= 5 && english_grade <= 3 && math_grade <= 3) {
        printf("Student Accepted :)\n");
        return true;
}
#

It's a bit weird you require both the english grade and math grade lower than 3 to be accepted?