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 Coding
- {
- class Program
- {
- static void Main(string[] args)
- {
- int number = int.Parse(Console.ReadLine());
- string imput = Convert.ToString(number);
- int lastNumber = number % 10;
- int lastNumberToprint = 0; //to be added to 33
- int lastNumCount = 0; // sum of last numbers
- for (int i = 0; i < imput.Length; i++)
- {
- lastNumCount += lastNumber;
- lastNumberToprint = lastNumber + 33;
- for (int j = 0; j < lastNumber; j++)
- {
- Console.Write((char)lastNumberToprint);
- }
- lastNumber = ((number - lastNumCount) / 10);
- lastNumber = lastNumber % 10;
- if (lastNumber == 0) Console.WriteLine("ZERO");
- else Console.WriteLine();
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment