Program inch_sm;
var d, s: real;
const m = 2.5: real;
begin
write ('Введите количество дюймов: ');
readln(d);
s := d*m;
writeln (d, ' дюймов = ', s, ' сантиметров')
end.
Упрощенный вариант:
program inch_sm;
var d, s: real;
const m = 2.5: real;
begin
readln(d);
s := d*m;
writeln (s)
end.
Дано:
Объем сообщения = 450 байт
Количество символов = 150
Решение:
1. Вес одного символа:
450/150 = 3 (бита)
2. Мощность алфавита:
2^3 = 8
var chastnoe,cifra,x,y:integer;
begin
y:=237;
cifra:=(y div 100);//получаем первую цифру числа 237
chastnoe:=(y mod 100);//находим число получившееся после деления
x:=chastnoe*10+cifra;//находим число Х
writeln(x);//выводим
end.
//PascalABC.NET
//Версия 3.3, сборка 1611
begin
write(ReadSeqIntegerWhile(x->x<>0).Where(x->x.IsEven).Count());
end.
5A316 = 3·160+10·161+5·162
= 3·1+10·16+5·256 = 3+160+1280 = 144310
0hex
=
0dec
=
0oct
0
0
0
0
1hex
=
1dec
=
1oct
0
0
0
1
2hex
=
2dec
=
2oct
0
0
1
0
3hex
=
3dec
=
3oct
0
0
1
1
4hex
=
4dec
=
4oct
0
1
0
0
5hex
=
5dec
=
5oct
0
1
0
1
6hex
=
6dec
=
6oct
0
1
1
0
7hex
=
7dec
=
7oct
0
1
1
1
8hex
=
8dec
=
10oct
1
0
0
0
9hex
=
9dec
=
11oct
1
0
0
1
Ahex
=
10dec
=
12oct
1
0
1
0
Bhex
=
11dec
=
13oct
1
0
1
1
Chex
=
12dec
=
14oct
1
1
0
0
Dhex
=
13dec
=
15oct
1
1
0
1
Ehex
=
14dec
=
16oct
1
1
1
0
Fhex
=
15dec
=
17oct
1
1
1
1