Advertisement
Threed90

04.Coding

Oct 28th, 2018
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.60 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3.  
  4. namespace _04.Coding
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             int[] nums = Console.ReadLine().Select(x => (int)char.GetNumericValue(x)).ToArray();
  11.  
  12.  
  13.             for (int i = nums.Length - 1; i >= 0; i--)
  14.             {
  15.                 if (nums[i] == 0)
  16.                 {
  17.                     Console.WriteLine("ZERO");
  18.                 }
  19.                 else
  20.                 {
  21.                     Console.WriteLine(new string((char)(nums[i] + 33), nums[i]));
  22.                 }
  23.             }
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement