Last active
December 21, 2019 17:25
-
-
Save celsojr/b210d19d7f0412ff7122942ab67850cf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
for (int i = 0, x = 1; i <= 10; i++, x*=i) | |
{ | |
Console.WriteLine($"{i:D2}! - {x}"); | |
} | |
} | |
} | |
/* output | |
00! - 1 | |
01! - 1 | |
02! - 2 | |
03! - 6 | |
04! - 24 | |
05! - 120 | |
06! - 720 | |
07! - 5040 | |
08! - 40320 | |
09! - 362880 | |
10! - 3628800 | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment