Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Threading;
- namespace silnia
- {
- class Program
- {
- static void Main(string[] args)
- {
- //silnia
- Console.Clear();
- Console.WriteLine("Program oblicza silnie z ");
- Console.WriteLine();
- Console.Write("podaj n = ");
- int n = 1;
- int i = 1;
- int x = 1;
- n = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("wpisales n =" + n);
- Console.WriteLine("obliczam");
- n = n + 1;
- for (int j=1;j<10;j++)
- {
- Console.Write(".");
- Thread.Sleep(100); //czeka 100 ms
- }
- for (i=1;i<n;i++)
- {
- x = x * i;
- }
- Console.WriteLine("Wynik = " + x);
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment