Регистрация
Войти
Стать экспертом Правила
Информатика

С помощью операторов цикла вывести на экран
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 gt;= 1; i--)
            {
                for (int j = i; j gt;= 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
107
Контакты
Реклама на сайте
Спрошу
О проекте
Новым пользователям
Новым экспертам