SHARE
TWEET

Untitled

a guest Jan 28th, 2013 125 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3.     class StringFilled
  4.     {
  5.         static void Main()
  6.         {
  7.             Console.WriteLine("Enter a string smaller than 20 characters");
  8.             string text = Console.ReadLine();
  9.             if (text.Length<20)
  10.             {
  11.                 int length = 20-text.Length;
  12.                 string add = new string('*', length);
  13.                 text=text+add;
  14.             }
  15.             Console.WriteLine("The new one: {0}", text);
  16.  
  17.         }
  18.     }
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