Next year, Big Blue Madness will use a lottery number to select individuals who
ID: 3801937 • Letter: N
Question
Next year, Big Blue Madness will use a lottery number to select individuals who can receive Big Blue Madness tickets. While the event is free, the fans can purchase special souvenirs. People will register to have their names in the lottery and can also preorder souvenirs.
Code only the statements requested for the given question.
The value assigned to the variable numberOfTickets depends on the value of the lotteryNumber variable. Write only the if ... else statement that will assign to the numberOfTickets variable the value of 1 if the lotteryNumber is less or equal to 100 otherwise assign the value of 2 to the variable numberOfTickets.
Explanation / Answer
Here is the requested if...else statement
//if lotteryNumber is less than or equal to 100 set numberOfTickets to 1
if(lotteryNumber<=100)
numberOfTickets=1;
//else set numberOfTickets to 2
else
numberOfTickets=2;
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.