Pretorianbg

Untitled

Oct 28th, 2018
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Multiply_Table
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int number = int.Parse(Console.ReadLine());
  14. int lastDigit1 = number % 10;
  15. int number1 = 0;
  16. int number2 = 0;
  17.  
  18. for (int i = 1; i <= lastDigit1; i++)
  19. {
  20. number1 = number;
  21. number1 = number / 10;
  22. int lastDigit2 = number1 % 10;
  23.  
  24. for (int j = 1; j <= lastDigit2; j++)
  25. {
  26. number2 = number1;
  27. number2 = number1 / 10;
  28. int lastDigit3 = number2 % 10;
  29. for (int k = 1; k <= lastDigit3; k++)
  30.  
  31. {
  32. Console.WriteLine($"{i} * {j} * {k} = {k*j*i};");
  33. }
  34. }
  35. }
  36.  
  37. }
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment