0

Whats Wrong With My Code?

I’m a beginer and y tried yo solve the “Paint Cost” challenge, but I can’t solve it. 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) { double Paint = Convert.ToInt32 (Console.ReadLine ()); double Cost = 40.00+ (Paint * 5.00); double Tax = (Cost/10); double Total = Cost + Tax; Console.WriteLine (Total); } } }

24th Feb 2020, 3:40 PM
Bryan
Bryan - avatar
3 RĂ©ponses
0
You must be follow the instruction, i think this question is want the input and the ouput is integer not double, but you can also use ceil () to upper your number (ex: ceil (1.6) = 2)
24th Feb 2020, 3:52 PM
Tegar
Tegar - avatar
+ 2
Total should be rounded up for ex:50.05 to 51.so use Ceil function, and Convert to int value, then output.
24th Feb 2020, 3:47 PM
Jayakrishna 🇼🇳
0
Thank you so much, I didn’t kwow that function. Thanks for your answers guys.
24th Feb 2020, 4:02 PM
Bryan
Bryan - avatar