Advertisement
ss3434

Untitled

Oct 20th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 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 _3.Кодиране
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13.  
  14. string number = Console.ReadLine();
  15.  
  16. for (int i = number.Length - 1; i >= 0; i--)
  17. {
  18. char currentDigit = number[i];
  19. int currnetDigitToNum = int.Parse(currentDigit.ToString());
  20. if (currnetDigitToNum == 0)
  21. {
  22. Console.WriteLine("ZERO");
  23. continue;
  24. }
  25. for (int n = 1; n <= currnetDigitToNum; n++)
  26. {
  27. Console.Write((char)(currnetDigitToNum + 33));
  28. }
  29. Console.WriteLine();
  30. }
  31. }
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement