3 Answers. You must use something like this: if(score >= 10 && <= 19 ) { discount = 0.20; } else if(score >= 20 && <= 49) { discount = 0.30; } And so on….27 Eyl 2014
Read moreHow do you calculate a number in Java?
line 1: int first = (1 + 1); line 2: int second = first + 3 * (2 + 5); line 3: line 4: first = 5; line 5: line 6: int third = first + second; line 7: System. out. println(first); line 8: System. out.
Read moreHow do you calculate selling price in Python?
# Python Program to Calculate Profit or Loss actual_cost = float(input(” Please Enter the Actual Product Price: “)) sale_amount = float(input(” Please Enter the Sales Amount: “)) if(actual_cost – sale_amount > 0): amount = actual_cost – sale_amount print(“Total Loss Amount = {0}”.
Read moreHow do you take a percent off a number in Python?
To calculate a percentage in Python, use the division operator (/) to get the quotient from two numbers and then multiply this quotient by 100 using the multiplication operator (*) to get the percentage.
Read moreHow do you calculate discount in Python?
Calculate discount amount python code
Read moreHow do you write a series program in Java?
Java Program to Find Sum of the Series 1/1!
Read moreHow do you calculate bills in Python?
Python program to calculate electricity bill
Read more