Advertisement
ss3434

Untitled

Oct 20th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 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._3_Кодиране
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13.  
  14. var n = int.Parse(Console.ReadLine());
  15. string n4islo = n.ToString();//2049
  16. int curentNum = 0;
  17. char ch = ' ';
  18. for (int i =0; i < n4islo.Length; i++)
  19. {
  20.  
  21. curentNum = n % 10;
  22. n /= 10;
  23. if (curentNum==0)
  24. {
  25. Console.Write("ZERO");
  26. }
  27. int charCurentNum= curentNum+33;
  28. ch = (char)charCurentNum;
  29.  
  30. for (int j = 0; j < curentNum; j++)
  31. {
  32. Console.Write(ch);
  33. }
  34. Console.WriteLine();
  35. }
  36.  
  37. }
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement