Advertisement
ElviraPetkova

Coding

Dec 9th, 2018
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.89 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _4.Coding
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int number = int.Parse(Console.ReadLine());
  14.             int lenghtOfNum = number.ToString().Length;
  15.  
  16.             for (int a = 0; a < lenghtOfNum; a++)
  17.             {
  18.                 int lastNum = number % 10;
  19.                 if (lastNum != 0)
  20.                 {
  21.                     for (int b = 0; b < lastNum; b++)
  22.                     {
  23.                         Console.Write((char)(lastNum + 33));
  24.                     }
  25.                     Console.WriteLine();
  26.                 }
  27.                 else
  28.                 {
  29.                     Console.WriteLine("ZERO");
  30.                 }
  31.                 number = number / 10;
  32.             }
  33.         }
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement