I'm kinda stuck on how to write the if statement for the following situation:
Let say this person played two games
the first game if he gets a score less than or equal to 100, he gets 15 tickets for each score he got. so if he scored 100 it would be : 100*15=1500 tickets
the second game if he score higher than 100 he gets 2.5 more tickets for each point after 100. So let say he scored 106 he will get 15*2.5*6 = 225 + 1500 = 1725 tickets total
I know how to write the statement for the first game but not the second one any helps/ hints would be appreciated
for the second one im not sure how to type in the if else statement if he scores higher than 100. Like for example what happens if the user input 106? How do i print out the total number of tickets he will get based on the situation?
if the user gets higher than 100, then for each score he will get an additional 2.5 more tickets.
its really hard to explain what i need help with but i hope you get what i meant
if (game1score is higher than 100)
{
//Compute the math (i.e. if score is 106
// he will get 15*2.5*6 = 225 + 1500 = 1725 tickets total.
//Let the user know the tickets total.
}
The above should give you an idea on how to work the problem out.
Hint: you may one to use constant variables for the values that will not change.