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 _10.Centuries_to_Nanoseconds
- {
- class Program
- {
- static void Main(string[] args)
- {
- int centuries = int.Parse(Console.ReadLine());
- int toYears = centuries * 100;
- int toDays = (int)(toYears * 365.2422);
- int toHours = toDays * 24;
- int toMinutes = toHours * 60;
- long toSeconds = (long)toMinutes * 60;
- long toMilliSeconds = (long)toSeconds * 1000;
- long toMicroSeconds = (long)toMilliSeconds * 1000;
- decimal toNanoSecons = (decimal)toMicroSeconds * 1000;
- Console.WriteLine($"{centuries} centuries = {toYears} years = {toDays} days = {toHours} hours = {toMinutes} minutes = {toSeconds} seconds = {toMilliSeconds} milliseconds = {toMicroSeconds} microseconds = {toNanoSecons} nanoseconds");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement