Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class WorkHours
- {
- static void Main()
- {
- int h = int.Parse(Console.ReadLine());
- double d = double.Parse(Console.ReadLine());
- double p = double.Parse(Console.ReadLine());
- double workHours = (d - (d / 10)) * 12;
- double effWorkHours = workHours * (p / 100);
- int diff = h - (int)Math.Floor(effWorkHours);
- if (diff <= 0)
- {
- Console.WriteLine("Yes\n{0}", -diff);
- }
- else
- {
- Console.WriteLine("No\n{0}", -diff);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement