Sei sulla pagina 1di 3

ACTIVITY 3

<h2>Activity 3</h2>
<left>
<p style="font-size:25">To avail of a college scholarship, an applicant
must provide three figure: his NSAT SCORE,monthly salary of his parents and entrance examination
score. The college may either decide to accept, reject, or further study his application based on the
following conditions.</p>

<p style="font-size:25;">Rejected is any of the following


exists:<br>A.Parent,s salary is above 10,000<br>B.NSAT score is below 90<br>C.Entrance exam score is
below 85</p>

<p style="font-size:25px;">Accepted if all of the following are


met<br>A.Parents' salary is at most 3,500<br>B.Average of NSAT and entrance exam is atleast 91</p>
<p style="font-size:25px;">Any application which is neither accepted
nor reject will be subjected for further study.Make a program that would input the NSAT score,parent's
salary and entrance exam score and then output whether the applicant is accepted,rejected or for
further study.</p>

</left>
</left>
<form method="post" style="font-size:20px;">

<input type="text" name="parent_salary" value="" placeholder="PARENT SALARY"


value="" style="font-size:25px;">
<br>
<input type="text" name="nsat_score" value="" placeholder="NSAT SCORE" value=""
style="font-size:25px;">
<br>
<input type="text" name="entrance_Xscore"
value="" placeholder="ENTRANS EXAM" value="" style="font-size:25px;">
<br>
<input type="submit" name="submit"
value="submit" style="font-size:25px;"><br>
<?php
$nsat_score= $parent_salary= $entrance_Xscore= $average= $average2= "";

if(isset($_POST["submit"])){

if(empty($_POST["nsat_score"])){
echo"Please enter a number";
}else{

$nsat_score = $_POST["nsat_score"];
}

if(empty($_POST["parent_salary"])){
echo"Please enter a number";
}else{

$parent_salary = $_POST["parent_salary"];
}
if(empty($_POST["entrance_Xscore"])){
echo"Please enter a number";
}else{
$entrance_Xscore = $_POST["entrance_Xscore"];
}

$average = $nsat_score + $entrance_Xscore;


$average2 = $average / 2;

if($parent_salary >= 10000 || $nsat_score < 90 || $entrance_Xscore < 85 ){

echo"<h1>APPLICANT REJECTED TO BE A SCHOLAR</h1>";

}else if($parent_salary <= 3500 && $average2 >= 91){

echo"<h1>APPLICANT ACCEPTED TO BE A SCHOLAR</h1>";


}else{

echo"<h1>FOR FURTHER STUDY!</h1>";

}
echo"<h2>Parent Salary: $parent_salary<br>NSAT SCORE: $nsat_score<br>ENTRANCE
SCORE: $entrance_Xscore<br>AVERAGE: $average2</h2>";

}
?>
</form>
</left>

Potrebbero piacerti anche