Advertisement
BojidarDosev

zadacha 2 dimana

Sep 26th, 2021
977
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.70 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp9
  4. {
  5.     class Program
  6.     {
  7.  
  8.        
  9.  
  10.         static void Main(string[] args)
  11.         {
  12.             Console.WriteLine("vuvedete chas: ");
  13.             int hh = int.Parse(Console.ReadLine());
  14.             Console.WriteLine("vuvedete minuti: ");
  15.             int mm = int.Parse(Console.ReadLine());
  16.            if (mm < 40)
  17.             {
  18.                 Console.WriteLine("Chasat sled 20 minuti shte e: " + hh + ":" + (mm + 20));
  19.             }
  20.             if (mm > 40 )
  21.             {
  22.                 hh = hh + 1;
  23.                 mm = mm - 40;
  24.                 Console.WriteLine("Chasat sled 20 minuti shte e: " + hh + ":" + mm);
  25.             }
  26.         }
  27.     }
  28. }
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement