Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class StringFilled
- {
- static void Main()
- {
- Console.WriteLine("Enter a string smaller than 20 characters");
- string text = Console.ReadLine();
- if (text.Length<20)
- {
- int length = 20-text.Length;
- string add = new string('*', length);
- text=text+add;
- }
- Console.WriteLine("The new one: {0}", text);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement