Level 8
Hii, u can implement this equation in PHP and display the result on the result page.
<?php
$total_questions = 10;
$correct_answers = 8;
$passing_percentage = 60;
if ($correct_answers/$total_questions * 100 >= $passing_percentage) {
echo "Congratulations! You have passed the exam.";
} else {
echo "Sorry, you have not passed the exam.";
}
?>
1 like