dinko_dt

Untitled

Nov 24th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Multiply_Table
  4. {
  5. class Program
  6. {
  7. static void Main()
  8. {
  9. string incomingNumber = Console.ReadLine();
  10.  
  11.  
  12. int firstDigit = Math.Abs(int.Parse(incomingNumber[0].ToString()));
  13. int secondDigit = Math.Abs(int.Parse(incomingNumber[1].ToString()));
  14. int thirdDigit = Math.Abs(int.Parse(incomingNumber[2].ToString()));
  15.  
  16. for (int i = 1; i <= thirdDigit; i++)
  17. {
  18. for (int j = 1; j <= secondDigit; j++)
  19. {
  20. for (int k = 1; k <= firstDigit; k++)
  21. {
  22. Console.WriteLine($"{i} * {j} * {k} = {i * j * k};");
  23. }
  24. }
  25. }
  26.  
  27.  
  28. }
  29. }
  30. }
Add Comment
Please, Sign In to add comment