GerganaTsirkova

Numbers in reversed order

Feb 4th, 2018
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4.  
  5. namespace _4.NumberInReversedOrder
  6. {
  7. class Program
  8. {
  9. static void Main(string[] args)
  10. {
  11.  
  12. string input = Console.ReadLine();
  13. int number = input.Length;
  14. int counter = 1;
  15. while (number !=0)
  16. {
  17. Console.Write(input[input.Length-counter]);
  18. number--;
  19. counter++;
  20. }
  21. Console.WriteLine();
  22. }
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment