Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Text.RegularExpressions;
- using System.Threading.Tasks;
- namespace StringLenght
- {
- class StringLenght
- {
- static void Main(string[] args)
- {
- string text = Console.ReadLine();
- var result = new StringBuilder();
- if (text.Length<20)
- {
- result.Append(text);
- for (int i = 0; i < 20-text.Length; i++)
- {
- result.Append("*");
- }
- Console.WriteLine(result);
- }
- else if (text.Length==20)
- {
- Console.WriteLine(text);
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment