D.3 Program development selection statements Exercises
1. Using only an if statement create code with for the following. First, initialise an int variable called grade to use for the logical tests. a) If a grade is greater than 80 print out "You got an A!".b) If a grade is less than 50 print out "You failed!".c) If a grade equals 100 print out "You scored a perfect score!".d) If a grade is greater than or equal to 50 and less than or equal to 100 print out "You passed!"...
To access the contents of this site, you must subscribe.