Advertisement
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 issue2workinghours
- {
- class Program
- {
- static void Main(string[] args)
- {
- int givenhours = int.Parse(Console.ReadLine());
- int workers = int.Parse(Console.ReadLine());
- int days = int.Parse(Console.ReadLine());
- int workinghours = (workers * days) * 8;
- if(workinghours>givenhours)
- {
- Console.WriteLine("{0} hours left", workinghours - givenhours);
- }
- else if(workinghours<givenhours)
- {
- Console.WriteLine("{0} overtime\nPenalties: {1}",Math.Abs(workinghours-givenhours),((Math.Abs(workinghours-givenhours))*days));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement