Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int totalhours = int.Parse(Console.ReadLine());
- int days = int.Parse(Console.ReadLine());
- int people = int.Parse(Console.ReadLine());
- double peopleDay = days * 0.90;
- double peopleHour = (10 * peopleDay) * people;
- double leftHours = peopleHour - totalhours;
- double notleft = totalhours - peopleHour;
- if (totalhours <= peopleHour)
- {
- Console.WriteLine("Yes!{0} hours left.", Math.Floor(leftHours));
- }
- else if (totalhours > peopleHour)
- {
- Console.WriteLine("Not enough time!{0} hours needed.", Math.Floor(notleft));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment