SHARE
TWEET

Untitled

ge_or_gi Jan 31st, 2013 67 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 AddStarsIfNecesary
  8. {
  9.     class AddStarsIfNecesary
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.  
  14.  
  15.             Console.WriteLine("No More then 20 Symbols Please:");
  16.  
  17.             string userInput = Console.ReadLine();
  18.  
  19.             if (userInput.Length > 20)
  20.             {
  21.                 Console.WriteLine("Cutting everyting over 20 :");
  22.                 Console.WriteLine(userInput.Remove(20));
  23.             }
  24.             if (userInput.Length == 20)
  25.             {
  26.                  Console.WriteLine("Noting to Add");
  27.                 Console.WriteLine(userInput);
  28.             }
  29.             else
  30.             {
  31.                 Console.WriteLine("Adding Stars to 20");
  32.                 Console.WriteLine(userInput.PadRight(20, '*'));
  33.             }
  34.  
  35.  
  36.  
  37.         }
  38.     }
  39. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top