Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace StringLength
- {
- using System;
- public class StringLength
- {
- public static void Main()
- {
- string input = Console.ReadLine();
- if (input.Length < 20)
- {
- Console.WriteLine(input + new string('*', 20-input.Length));
- }
- else if (input.Length == 20)
- {
- Console.WriteLine(input);
- }
- else if (input.Length > 20)
- {
- string newString = input.Substring(0, 20);
- Console.WriteLine(newString);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment