Vapio

task6

Mar 4th, 2021 (edited)
422
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.49 KB | None | 0 0
  1. using System;
  2.                    
  3. public class Program
  4. {
  5.     public static void Main()
  6.     {
  7.         string phrase = "";
  8.         uint repeatAmount = 0;
  9.        
  10.         Console.WriteLine("Please input a phrase you want to repeat : ");
  11.         phrase = Console.ReadLine();
  12.        
  13.         Console.WriteLine("How much times you want to repeat : ");
  14.         repeatAmount = Convert.ToUInt32(Console.ReadLine());
  15.        
  16.         while (repeatAmount > 0)
  17.         {
  18.             Console.WriteLine(phrase);
  19.             --repeatAmount;
  20.         }
  21.     }
  22. }
Add Comment
Please, Sign In to add comment