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); } } }
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)
+ 2
Total should be rounded up for ex:50.05 to 51.so use Ceil function, and Convert to int value, then output.
0
Thank you so much, I didnât kwow that function. Thanks for your answers guys.