Subject: PHP

If elseif Problem

Create a variable $marks = 85. Use an if-else if-else ladder to print:

  • "Grade A" if marks are greater than or equal to 90
  • "Grade B" if marks are between 75 and 89
  • "Grade C" if marks are below 75

Select file or drag and drop

PNG, JPG, SVG

Preview