На третьей строчке, видимо, ошибка, и вместо Вывод(x) на самом деле Ввод(x).
var x: integer; y: real; begin Readln(x); y := (10 + 2 * x) / (11 - x); Writeln(y); end.При x = 3 переменная y = 2Задание 3var number, resultNumber, i: integer; begin resultNumber := 1; for i := 1 to 3 do begin Readln(number); resultNumber := resultNumber * number; end; Writeln(resultNumber); end.Задание 4var a: integer; b, c: real; begin a := 3; b := -1.5; c := 6 - 2 * b; c := c - a; Writeln(c); end.Результатом вывода будет число 6Задание 5var x, y, z: integer; begin x := 8; y := 2; if (x > y) then z := x - y else z := y + x; Writeln(z); end.#include <iostream>
#include <vector>
using namespace std;
struct Year{
vector<string> winter = {"December", "January", "February"},
spring = {"March", "April", "May"},
summer = {"June", "July", "August"},
autumn = {"September", "October", "November"};
};
void printWinter(Year &year_){
for(auto &i: year_.winter)
cout << i << " ";
cout << "\n";
}
void printSpring(Year &year_){
for(auto &i: year_.spring)
cout << i << " ";
cout << "\n";
}
void printSummer(Year &year_){
for(auto &i: year_.summer)
cout << i << " ";
cout << "\n";
}
void printAutumn(Year &year_){
for(auto &i: year_.autumn)
cout << i << " ";
cout << "\n";
}
signed main() {
Year y;
printWinter(y);
printSpring(y);
printSummer(y);
printAutumn(y);
}
78
Объяснение:
43 в 16 СС = 4 * 16^1 + 3 * 16^0 = 4 * 16 + 3 * 1 = 64 + 3 = 67 в 10 СС
116 в 8 СС = 1 * 8^2 + 1 * 8^1 + 6 * 8^0 = 1 * 64 + 1 * 8 + 6 * 1 = 64 + 8 + 6 = 78 в 10 СС
1000101 в 10 СС = 1 * 2^6 + 0 * 2^5 + 0 * 2^4 + 0 * 2^3 + 1 * 2^2 + 0 * 2^1 + 1 * 2^0 = 1 * 64 + 0 * 32 + 0 * 16 + 0 * 8 + 1 * 4 + 0 * 2 + 1 * 1 = 64 + 4 + 1 = 69 в 10 СС
Максимальное: 78 в 10 СС