vlad199411003
13.06.2022 14:23

Программа которая выводит слово информатика , используя всего три переменных

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
leonde
26.08.2020 16:29

#inclued<bits/stdc++.h>

using namespace std;

int main()

{int d,m;

cin>>d>>m;

if (m==1)

{if (d>=20)

cout<<"vodoleey";

else cout<<"kozerog";}

if (m==2)

{if (d>=19)

cout<<"ribi";

else cout<<"vodoley";}

if (m==3)

{if (d>=21) cout<<"oven";

else cout<<"ribi";}

if (m==4)

{if (d>=20)

cout<<"telec";

else cout<<"oven";}

if (m==5)

{if (d>=21)

cout<<"blizneci";

else cout<<"telec";}

if (m==6)

{if (d>=22)

cout<<"rac";

else cout<<"blizneci";}

if (m==7)

{if (d>=23)

cout<<"lev";

else cout<<"rac";}

if (m==8)

{if (d>=23)

cout<<"deva";

else cout<<"lev";}

if (m==9)

{if (d>=23) cout<<"vesi";

else cout<<"deva";}

if (m==10)

{if (d>=23)

cout<<"scorpion";

else cout<<"vesi";}

if (m==11)

{if (d>=23)

cout<<"strelec";

else cout<<"scorpion";}

if (m==12)

{if(d>=22)

cout<<"kozerog";

else cout<<"strelec";}

return 0;

}

0,0(0 оценок)
Ответ:
permyakov2001
25.05.2021 04:11
//Pascal ABC.NET Версия 2.2 Сборка 790
var ma:array[1..10,1..10] of integer;
ar:array[1..10] of integer;
i,j,s:integer;
begin;
randomize;
writeln('Matrix:');
for i:=1 to 10 do
begin;
    writeln;
    for j:=1 to 10 do
    begin;
       ma[i,j]:=random(-10,10);
       write(ma[i,j]:5);
           if ma[i,j]<0 then ar[i]+=ma[i,j];
    end;
end;
writeln;
writeln('Final array:');
for i:=1 to 10 do
writeln(ar[i]);
end.

Пример вывода:
Matrix:
   9  -1   3 -10   6   3  -9   8   5  -6  -4   4  -6   7   7   7 -10   4  -2   3  -9  -3  10  -9   2  -7   1  -8  -8  -8  -5  -4   2  -5  -9  -9   3   6   7  -5   3   8  10   0  -9   4  -3   6 -10  -9   9  10  -8   1  -1   2  -1   1  -2   3  -8  10   5   3  10 -10  -8   9   6   6  -6  -5   8  -7 -10  -7  -2  -1 -10   9   7   5  -9 -10  -6  -5  -7  -9   7  -1   2  -9  -2  -6  -8   4  -7  -3   1  -9
Final array:
-26
-22
-52
-37
-31
-12
-26
-48
-47
-44
0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota Оформи подписку
logo
Начни делиться знаниями
Вход Регистрация
Что ты хочешь узнать?
Спроси ai-бота