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 ConsoleApp1
- {
- class Program
- {
- static uint Maciek_1(uint a, uint b)
- {
- while (a != b)
- if (a > b)
- a -= b;
- else
- b -= a;
- return a;
- }
- static void Maciek_2()
- {
- Console.BackgroundColor = ConsoleColor.Blue;
- Console.ForegroundColor = ConsoleColor.Yellow;
- Console.Clear();
- }
- static uint Maciek_A(string Komunikat)
- {
- Console.WriteLine(Komunikat);
- return uint.Parse(Console.ReadLine());
- }
- static void Main(string[] args)
- {
- Maciek_2();
- uint a = Maciek_A()("Podaj a.");
- uint b = Maciek_A()("Podaj b.");
- Console.WriteLine("NWD (" + a +"," + b + ")wynosi: "+ Maciek_1(a, b));
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement