By Circaflex,
By andrewbares,
By Good Bot, Bad Bot · Posted
By deadonthefloor · Posted
By Skwerl · Posted
By hellowalkman · Posted
By Good Bot, Bad Bot · Posted
We rely on ads to keep creating quality content for you to enjoy for free.
Please support our site by disabling your ad blocker.
Continue without supporting us
If the prompt is still appearing, please disable any tools or services you are using that block internet ads (e.g. DNS Servers, tracking protection or privacy extensions).
Question
kevinv
Task:
A retail company assigns a $5000 store bonus if monthly sales are $100,000 or more. Additionally, if their sales are 125% or more of their monthly goal of $90,000, then all employees will receive a message stating that they will get a day off.
function Main()
var real monthlySales;
{
bonusMoney = getBonus();
dayoff = getdayOff();
getSales = monthySales();
}
function getSales(Real Ref monthlySales)
{
return prompt("Enter the total sales for the month.");
end function
}
function getBonus(Real Ref monthlySales)
{
If monthlySales >=100000 Then
Println ?You get a bonus of $5,000!!!?;
End If
End function
}
function GetDayoff(Real Ref monthlySales)
{
if monthlySales >=112500 Then
Println ? You get a bonus of $5,000!!!?;
Println ?All employees get one day off!!!?;
End If
End function
Main();
When I run this in the display window all I get is
Link to comment
https://www.neowin.net/forum/topic/1185699-java-script-homework-help/Share on other sites
8 answers to this question
Recommended Posts