Advertisement
Spocoman

04. Centuries to Minutes

Jan 15th, 2022
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.51 KB | None | 0 0
  1. using System;
  2.  
  3. namespace CenturiesToMinutes
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int centuries = int.Parse(Console.ReadLine());
  10.             int years = centuries * 100;
  11.             double days = Math.Floor(years * 365.2422);
  12.             ulong hours = (ulong)days * 24;
  13.             ulong minutes = hours * 60;
  14.  
  15.             Console.WriteLine($"{centuries} centuries = {years} years = {days} days = {hours} hours = {minutes} minutes");
  16.         }
  17.     }
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement