Ответ:
Ничего сложного
Объяснение:
1.
#include <iostream>
using namespace std;
int main() {
setlocale(LC_ALL, "rus");
int that = 1, index = 1, sum_index = 0, sum_element = 0;
while (that != 0) {
cin >> that;
if (that % 2 == 0) sum_element += that;
if (index % 2 == 0) sum_index += that;
index++;
}
cout << "Сумма четных элементов = " << sum_element << endl;
cout << "Сумма элементов с четными индексами = " << sum_index;
}
2.
#include <iostream>
using namespace std;
void cycle_for() {
int sum = 0;
for (int i = 50; i <= 150; i++) if (i % 4 == 0) sum += i * i;
cout << "Cycle for: " << sum << endl;
}
void cycle_while() {
int i = 50, sum = 0;
while (i <= 150) {
if (i % 4 == 0) sum += i * i;
i++;
}
cout << "Cycle while: " << sum << endl;
}
void cycle_do_while() {
int i = 50, sum = 0;
do {
if (i % 4 == 0) sum += i * i;
i++;
} while (i <= 151);
cout << "Cycle do while: " << sum;
}
int main() {
cycle_for();
cycle_while();
cycle_do_while();
}
Program question;
var
a: string;
b: integer;
begin
writeln('Сколько тебе лет?:');
readln(b);
if b > 17 then begin
writeln('В каком институте ты учишься?:');
readln(a);
writeln(a, ' хороший институт');
writeln('До следующей встречи!');
end
else
if b <= 17 then begin
writeln('В какой школе ты учишься?');
readln(a);
writeln(a, ' не плохая школа');
writeln('До следующей встречи!');
end;
end.
64 цвета => объём, который занимает 1 точка изображения в памяти, равен 6 бит (2^6 = 64)
512*64*6 = 2^7*2^6*2*3 = 2^14*3 (объём в битах)
1 Кбайт = 2^13 бит
2^14*3 / 2^13 = 2*3 = 6 Кбайт
Var
x: integer;
begin
Write('Введите число ');
Readln(x);
Writeln('Утроенное значение равно ', 3 * x)
end.
Что надо то?
Таблицу истинности?