С помощью операторов цикла вывести на экран 54321 4321 321 21 1

С помощью операторов цикла вывести на экран 54321 4321 321 21 1
Гость
Ответ(ы) на вопрос:
Гость
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication7 {     class Program     {         static void Main(string[] args)         {             for (int i = 5; i >= 1; i--)             {                 for (int j = i; j >= 1; j--)                 {                     Console.Write(j);                 }                 Console.WriteLine();             }             Console.ReadKey();         }     } }
Гость
var i,j:integer; begin for i:=5 downto 1 do  begin  for j:=i downto 1 do write(j);  writeln;  end; end. Результат: 54321 4321 321 21 1
Не нашли ответ?
Ответить на вопрос
Похожие вопросы