Advertisement
martinvalchev

Thea_The_Photographer

Jan 31st, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.81 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Thea_The_Photographer
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int numOfPic = int.Parse(Console.ReadLine());
  10.             int filterTime = int.Parse(Console.ReadLine());
  11.             int procent = int.Parse(Console.ReadLine());
  12.             int uploadTime = int.Parse(Console.ReadLine());
  13.  
  14.  
  15.             double filterPic = Math.Ceiling(numOfPic * (procent / 100.0));
  16.             double first = (double)numOfPic * filterTime;
  17.             double secont = (double) filterPic * uploadTime;
  18.             double totalTime = (double) first + secont;
  19.  
  20.             TimeSpan time = TimeSpan.FromSeconds(totalTime);
  21.  
  22.             string formatToClock = time.ToString(@"d\:hh\:mm\:ss");
  23.             Console.WriteLine(formatToClock);
  24.  
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement