Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main(string[] args)
- {
- ulong wykladnik, liczba, wynik;
- Console.WriteLine("Podaj liczbę");
- liczba = Convert.ToUInt64(Console.ReadLine());
- wynik = liczba;
- Console.WriteLine("Podaj wykładnik");
- wykladnik = Convert.ToUInt64(Console.ReadLine());
- Console.WriteLine();
- if (wykladnik == 0)
- {
- Console.WriteLine(wynik = 1);
- }
- else if (wykladnik > 1)
- {
- for (uint i = 1; i < wykladnik; i++)
- {
- wynik = wynik * liczba;
- Console.WriteLine(liczba + " do " + wykladnik + " = " + wynik);
- }
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement