+ 3
Manav Roy (2 / houses) * 100 Where houses is input. and 2 is houses from where you get dollar bill You want output in nearest whole number so use Math.ceil
7th Apr 2022, 2:53 AM
A͢J
A͢J - avatar
0
Manav Roy There would not be all toothbrush. There might be candy also but only from 2 houses you would get money. So (2 / 6) * 100
7th Apr 2022, 4:46 AM
A͢J
A͢J - avatar
0
int houses=Convert.ToInt32(Console.ReadLine()); Console.WriteLine(Math.Ceiling(200.0/houses));
8th Apr 2022, 2:11 PM
Jackie
Jackie - avatar