Good day I've been tasked with an assignment where I am meant to write a program that indicates whether a student has passed or failed after they have made an input of their grades. The student has to input 6 grades and in order to obtain a pass they must have attained 50 percent or more for English and 3 other subjects and if not then they have failed. my first thought at solving this was to create nested if statements for all possible varieties in which the marks could come like below:
keeping "if(a>50)" as the common statement among the various possible nested if statements. But this seemed a bit tedious and lacking in elegance so if there are any easier solutions to this problems they'd be much appreciated.