Guest User

06.MultiplyTable

a guest
Jul 1st, 2019
144
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _06.MultiplyTable
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.  
  14.             int num = int.Parse(Console.ReadLine());
  15.            
  16.  
  17.             char[] revNum = num.ToString().ToCharArray();
  18.             Array.Reverse(revNum);
  19.             int fL = (int)char.GetNumericValue(revNum[0]);
  20.             int sL = (int)char.GetNumericValue(revNum[1]);
  21.             int tL = (int)char.GetNumericValue(revNum[2]);
  22.             //Console.WriteLine(f);
  23.             for (int f = 1; f <= fL; f ++) {
  24.                 for (int s = 1; s <= sL; s++)
  25.                 {
  26.                     for (int t = 1; t <= tL; t++)
  27.                     {
  28.                         Console.WriteLine($"{f} * {s} * {t} = {f*s*t};");
  29.                     }
  30.                 }
  31.             }
  32.  
  33.         }
  34.  
  35.     }
  36. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×