+ 1

help me please 13.2 13.3 c#

-------------------------------------------------------------------------------------------------------------- A restaurant provides a 15% discount if the bill exceeds 1500․ Write a program to take the bill total as input and output the discount amount. Sample Input 2700 Sample Output 405 Hint 405 is the discount for a 2700 bill (0.15*2700). !!!The program should output nothing if the bill total is less than or equal to 1500.!!! -------------------------------------------------------------------------------------------------------------- Hello, I am translating from Russian, I have a question, in 13.2 and 13.3 practical tasks, it asks that if the if block is not executed, the program should not output anything, how to do this? in task 13.2 when writing code int bill = Convert.ToInt32 (Console.ReadLine ()); if (bill> 1500); { Console.WriteLine (bill * 0.15); } only 1, 2, 4 test numbers are executed, but tests 3, 5 ask that nothin

7th Aug 2021, 7:38 AM
Алексей
Алексей - avatar
2 Respuestas
+ 6
You need to remove the semicolon after the if statement. if(bill > 1500){ }
7th Aug 2021, 7:50 AM
Simba
Simba - avatar
0
Simba, oh my God, how am I an idiot, thank you very much, you are the best))
7th Aug 2021, 7:58 AM
Алексей
Алексей - avatar