BeseliaslivMisfit
30.01.2020 22:40

Информатика, СДЕЛАТЬ В PYTHON !


Информатика, СДЕЛАТЬ В PYTHON !

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
Arturiomajarbio
14.10.2021 06:24

Задание 1

#include <iostream>

using namespace std;

int main() {

int a, b;

cin >> a >> b;

cout << a - b;

}

Задание 2

#include <iostream>

#include <math.h>

using namespace std;

int main() {

int a;

cin >> a;

cout << pow(a, 2) << ' ' << pow(a, 3)<< ' ' << pow(a, 5);

}

Задание 3

#include <iostream>

#include <math.h>

using namespace std;

int main() {

int a;

cin >> a;

cout << "The next number for the number " << a << " is " << a + 1 <<"!\n" <<"The previous number for the number "<< a << " is " << a - 1 <<"!";

}

Задание 4

#include <iostream>

#include <math.h>

using namespace std;

int main() {

int a;

cin >> a;

cout << (3 * pow(a, 3) + 18 * pow(a, 2)) * a + 12 * pow(a, 2) - 5;

}

Задание 5

#include <iostream>

#include <math.h>

using namespace std;

int main() {

int a, b, c;

cin >> a >> b >> c;

cout << a % 7 << "\n" << b % 7 << "\n" << c % 7;

}

Задание 6

#include <iostream>

#include <math.h>

using namespace std;

int main() {

int a, b, c, a1, b1, c1;

cin >> a >> a1 >> b >> b1 >> c >> c1;

cout << a1 % (8 - a) << "\n" << b1 % (8 - b) << "\n" << c1 % (8 - c);

}

0,0(0 оценок)
Ответ:
maarusya
19.02.2020 10:12

Program Pr1;
uses crt;
var mas:array[1..15] of integer;
i,max,min,b,v:integer;
Begin
clrscr;
for i:=1 to 15 do mas[i]:=random(10);
for i:=1 to 15 do write(mas[i]);
max:=0;
min:=100000;
b:=0;
for i:=1 to 15 do begin
if mas[i]>max then max:=i;
if mas[i]<min then min:=i;
end;
if max>min then for i:=min to max div 2 do begin
v:=mas[max-b];
mas[max-b]:=mas[i];
mas[i]:=v;
b:=b+1;
end
else for i:=max to min div 2 do begin
v:=mas[min-b];
mas[min-b]:=mas[i];
mas[i]:=v;
b:=b+1;
end;
writeln();
for i:=1 to 15 do write(mas[i]);
end.

 

0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota Оформи подписку
logo
Начни делиться знаниями
Вход Регистрация
Что ты хочешь узнать?
Спроси ai-бота