Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _01._Centuries_to_Minutes
- {
- class CenturesToMinutes
- {
- static void Main(string[] args)
- {
- //Write program to enter an integer number of centuries and convert it to years, days, hours and minutes.
- int centures = int.Parse(Console.ReadLine());
- int years = centures * 100;
- int days = (int)(years * 365.2422);
- int hours = days * 24;
- int minutes = hours * 60;
- Console.WriteLine($"{centures} centuries = {years} years = {days} days = {hours} hours = {minutes} minutes");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment