Convert below to javascript USING A WORD PROCESSING PROGRAM var score = prompt(\
ID: 3701169 • Letter: C
Question
Convert below to javascript
USING A WORD PROCESSING PROGRAM
var score = prompt("Enter SAT score: ");//getting score
var alumnus = prompt("Is one of your parent Alumnus: ?(y/n)");//getting almunus status
var income = prompt("Enter your Income: ");//getting income
if(score >= 1400)
{
alert("You are Selected");
if(income<100000)
{
alert("You are eligible for Scholarship");
}
else
{
alert("You are not eligible for Scholarship");
}
}
else if(score >= 1200 && income > 100000)
{
alert("You are Selected");
if(income<100000)
{
alert("You are eligible for Scholarship");
}
else
{
alert("You are not eligible for Scholarship");
}
}
else if(score >= 1200 && almunus=='y')
{
alert("You are Selected");
if(income<100000)
{
alert("You are eligible for Scholarship");
}
else
{
alert("You are not eligible for Scholarship");
}
}
Explanation / Answer
var score = prompt("Enter SAT score: ");//getting score var alumnus = prompt("Is one of your parent Alumnus: ?(y/n)");//getting almunus status var income = prompt("Enter your Income: ");//getting income if ((score >= 1400) || (score >= 1200 && (income > 100000 || alumnus == 'y'))) { alert("You are Selected"); if (income < 100000) { alert("You are eligible for Scholarship"); } else { alert("You are not eligible for Scholarship"); } }Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.