Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication7
- {
- class Program
- {
- static void Main(string[] args)
- {
- float number = float.Parse(Console.ReadLine());
- Console.WriteLine(ReverseNumber(number));
- }
- private static string ReverseNumber(float number)
- {
- string digits = number.ToString();
- char[] array = digits.ToCharArray();
- string output = string.Empty;
- for (int i = array.Length - 1; i >= 0 ; i--)
- {
- output += array[i].ToString();
- }
- return output;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment