Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Problem_13.Work_Hours
- {
- class Program
- {
- static void Main()
- {
- decimal h = int.Parse(Console.ReadLine());
- decimal d = int.Parse(Console.ReadLine());
- decimal p = int.Parse(Console.ReadLine());
- decimal bikingTime = d / 10;
- decimal FinalDays = d - bikingTime;
- decimal pInpercentage = p / 100;
- decimal FinalProduction = FinalDays * 12 * pInpercentage;
- int dif = (int)FinalProduction - (int)h;
- if (dif >= 0)
- {
- Console.WriteLine("Yes");
- Console.WriteLine(dif);
- }
- else
- {
- Console.WriteLine("No");
- Console.WriteLine(dif);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement