Advertisement
martinvalchev

Multiplication_Table_2._0

Jan 28th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.75 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Multiplication_Table_2._0
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int theInteger = int.Parse(Console.ReadLine());
  10.             int times = int.Parse(Console.ReadLine());
  11.            
  12.  
  13.             while (times <= 10)
  14.             {
  15.                 Console.WriteLine($"{theInteger} X {times} = {theInteger * times}");
  16.                 times += 1;
  17.                 if (times > 10)
  18.                 {
  19.                     return;
  20.                 }          
  21.                
  22.             }
  23.             while (times > 10)
  24.             {
  25.                 Console.WriteLine($"{theInteger} X {times} = {theInteger * times}");
  26.                 return;
  27.             }
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement