Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class Program
- {
- public static void Main()
- {
- string word = String.Empty;
- for (int count = 1; count <= 4; count++)
- {
- string number = Console.ReadLine();
- if (4 - number.Length == 4)
- {
- word += "0000 ";
- }
- else if (4 - number.Length == 3)
- {
- word += "000" + number + " ";
- }
- else if (4 - number.Length == 2)
- {
- word += "00" + number + " ";
- }
- else if (4 - number.Length == 1)
- {
- word += "0" + number + " ";
- }
- else if (4 - number.Length == 0)
- {
- word += number + " ";
- }
- }
- Console.WriteLine(word);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement