Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Numerics;
- namespace _10.CenturiesToNanoseconds
- {
- class Program
- {
- static void Main(string[] args)
- {
- int centuries = int.Parse(Console.ReadLine());
- int years = centuries * 100;
- int days = (int)(years * 365.2422);
- int hours = (days * 24);
- int minutes = hours * 60;
- long seconds = minutes * 60L;
- long milliseconds = seconds * 1000;
- ulong microseconds = (ulong)milliseconds * 1000;
- BigInteger nanoseconds = microseconds*BigInteger.Parse("1000"); //горе дописвам using System.Numerics; и променливата ми се разпознава
- Console.Write("{0} centuries = ", centuries);
- Console.Write("{0} years = ", years);
- Console.Write("{0} days = ", days);
- Console.Write("{0} hours = ", hours);
- Console.Write("{0} minutes = ", minutes);
- Console.Write("{0} seconds = ", seconds);
- Console.Write("{0} milliseconds = ", milliseconds);
- Console.Write("{0} microseconds = ", microseconds);
- Console.Write("{0} nanoseconds", nanoseconds);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement