Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace faktorialis_feladat
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Kólity Kristóf");
- Console.Write("Irj be egy természetes számot: ");
- int n = int.Parse(Console.ReadLine());
- int faktorialis = 1;
- for (int i = 1; i <= n; i++)
- {
- faktorialis *= i;
- }
- Console.WriteLine(n + "! faktorialis erteke = " + faktorialis);
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement