0

Candy

What is wrong here? 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) { int houses; double percent; houses = Convert.ToInt32(Console.ReadLine()); percent= (Math.Ceiling (2/houses*100) ); Console.Write (percent ); } } }

20th Feb 2020, 8:30 PM
GAG98
GAG98 - avatar
2 Respostas
+ 2
Math.Ceiling(2.0/houses * 100) //you need to print an integer value Console.Write((int) percent)
20th Feb 2020, 8:42 PM
Denise Roßberg
Denise Roßberg - avatar
+ 1
Thanks maaaaaaaan
20th Feb 2020, 8:50 PM
GAG98
GAG98 - avatar