martinvalchev

Numbers_in_Reversed_Order

Feb 2nd, 2018
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.54 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Numbers_in_Reversed_Order
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string input = Console.ReadLine();
  10.             Reversed(input);
  11.         }
  12.         public static void Reversed(string input)
  13.         {
  14.             if (input.Length > 1)
  15.             {
  16.                 for (int i = input.Length - 1; i >= 0; i--)
  17.                 {
  18.                     Console.Write(input[i]);
  19.                 }
  20.                 Console.WriteLine();
  21.             }
  22.         }
  23.     }
  24. }
Add Comment
Please, Sign In to add comment