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.Threading.Tasks;
- namespace ConsoleApplication7
- {
- class Program
- {
- static void Main(string[] args)
- {
- string input = Console.ReadLine();
- Console.WriteLine(CheckFillString(input));
- }
- static string CheckFillString(string someString)
- {
- StringBuilder check = new StringBuilder();
- if (someString.Length >= 20)
- {
- for (int i = 0; i < 20; i++)
- {
- check.Append(someString[i]);
- }
- }
- else
- {
- for (int j = 0; j < someString.Length; j++)
- {
- check.Append(someString[j]);
- }
- for (int p = 0; p < 20 - someString.Length; p++)
- {
- check.Append("*");
- }
- }
- return check.ToString();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment