Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
перевод 16-ричного числа в 10-чное
var a, b : char; x : integer; begin read (a, b); if a in ['0'..'9'] then x := 16 * ( ord(a) - ord('0') ) else if a in ['A'..'F'] then x := 16 * ( ord(a) - ord('A') +10 ) else if a in ['a'..'f'] then x := 16 * ( ord(a) - ord('a') +10 ); if b in ['0'..'9'] then x := x + ord(b) - ord('0') else if b in ['A'..'F'] then x := x + ord(b) - ord('A') + 10 else if b in ['a'..'f'] then x := x + ord(b) - ord('a') + 10; writeln (x); end.
run
|
edit
|
history
|
help
0
Задача №1516. Проверка на простоту (цикл while)
3
contar_divisores_de_N
test04
03 ariketa
test31
кристина
Tri 1.0
test23
диагональ в алфавите