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 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 = 24 * days;
- long minutes = 60 * hours;
- decimal seconds = 60m * minutes;
- decimal milliseconds = 1000m * seconds;
- decimal microseconds = 1000m * milliseconds;
- decimal nanoseconds = 1000m * microseconds;
- Console.WriteLine($"{centuries} centuries = {years} years = {days} days = {hours} hours = {minutes} minutes = {seconds} seconds = {milliseconds} milliseconds = {microseconds} microseconds = {nanoseconds} nanoseconds");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement