How to solve "Buy more, get more" If statement - C #?
I need help with this problem, which says the following: The if Statement 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). My code is as follows: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { //tomando la cuenta como entrada int bill = Convert.ToInt32(Console.ReadLine()); //tu código va aquí int acount = 2700; if(bill > 1500) { Console.WriteLine(0.15 * acount); } } } }