Как вывести полученное число в перевернутом виде? - C#
Формулировка задачи:
Листинг программы
- int a, b, c, d;
- Console.WriteLine("введите 3 числа");
- Console.Write("a= ");
- a = Convert.ToInt32 (Console.ReadLine());
- Console.Write("b= ");
- b = Convert.ToInt32 (Console.ReadLine());
- Console.Write("c= ");
- c = Convert.ToInt32 (Console.ReadLine());
- { d = a * b * c; }
- Console.WriteLine(d);
- Console.ReadLine();
Решение задачи: «Как вывести полученное число в перевернутом виде?»
textual
Листинг программы
- using System;
- using System.Linq;
- namespace ConsoleApp27
- {
- class Program
- {
- public static void Main()
- {
- int a, b, c, d;
- Console.WriteLine("введите 3 числа");
- Console.Write("a= ");
- a = Convert.ToInt32(Console.ReadLine());
- Console.Write("b= ");
- b = Convert.ToInt32(Console.ReadLine());
- Console.Write("c= ");
- c = Convert.ToInt32(Console.ReadLine());
- d = a * b * c;
- Console.WriteLine(d);
- Console.WriteLine(d.ToString().Reverse().ToArray());
- Console.ReadLine();
- }
- }
- }
ИИ поможет Вам:
- решить любую задачу по программированию
- объяснить код
- расставить комментарии в коде
- и т.д