Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace NestedLoopsExercise2Coding
- {
- class Program
- {
- static void Main(string[] args)
- {
- string inputNum = Console.ReadLine();
- for (int i = inputNum.Length - 1; i >= 0; i--)
- {
- int currentDigitToNumber = int.Parse(inputNum[i].ToString());
- if (currentDigitToNumber == 0) // 2nd
- {
- Console.WriteLine("ZERO");
- continue;
- }
- for (int j = 1; j <= currentDigitToNumber; j++)
- {
- Console.Write((char)(currentDigitToNumber + 33)); // Write!
- }
- Console.WriteLine(); // всеки символ на нов ред
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement