desislava_topuzakova

1. Векове към минути

Feb 26th, 2022
1,265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.64 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _01._From_centuries_to_minutes
  4. {
  5.     internal class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             //векове
  10.             sbyte centirues = sbyte.Parse(Console.ReadLine());
  11.             //години
  12.             short years = (short)(centirues * 100);
  13.             //дни
  14.             int days = years * 365;
  15.             //часове
  16.             int hours = days * 24;
  17.             //минути
  18.             long minutes = hours * 60;
  19.  
  20.             Console.WriteLine($"{centirues} centuries = {years} years = {days} days = {hours} hours = {minutes} minutes");
  21.         }
  22.     }
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment