Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Work_Hours
- {
- class WorkHours
- {
- public static void Main(string[] args)
- {
- int h = int.Parse(Console.ReadLine());
- int d = int.Parse(Console.ReadLine());
- int p = int.Parse(Console.ReadLine());
- double leliaWorkDays = d - (d * 0.10);
- double leliaWorkHours = leliaWorkDays * 12;
- double leliaEfficientWorkHours = leliaWorkHours * ((Convert.ToDouble(p)) / 100);
- double leliaEfficientWorkHoursRounded = Math.Floor(leliaEfficientWorkHours);
- int leliaRoundedHoursInteger = Convert.ToInt32(leliaEfficientWorkHoursRounded);
- int difference = leliaRoundedHoursInteger - h;
- if(difference >= 0)
- {
- Console.WriteLine("Yes");
- }
- else
- {
- Console.WriteLine("No");
- }
- Console.WriteLine(difference);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment