Var C:string; i:integer; begin Read(C); if Length(C) mod 4 <> 0 then For i:= 1 to 4-Length(C) mod 4 do C:='0'+C; For i:= 1 to Length(C) div 4 do Case StrToInt(C[4*i-3]+C[4*i-2]+C[4*i-1]+C[4*i]) of 0000:Write(0); 0001:Write(1); 0010:Write(2); 0011:Write(3); 0100:Write(4); 0101:Write(5); 0110:Write(6); 0111:Write(7); 1000:Write(8); 1001:Write(9); 1010:Write('A'); 1011:Write('B'); 1100:Write('C'); 1101:Write('D'); 1110:Write('E'); 1111:Write('F'); End; ReadLn; end.
using namespace std;
int main()
{
setlocale(LC_ALL, "RUSSIAN");
const int arr_len=20;
int arr[arr_len];
int i = 0;
srand(8120);
for (i = 0; i < arr_len; i++)
{
arr[i] = rand() % 100;
cout << arr[i] << ' ';
}
cout << endl;
int min = 100, min_index=arr[0];
for (i = 0; i < arr_len; i++)
{
if (arr[i] < min)
{
min = arr[i];
min_index = i;
}
}
cout << "Минимальный элемент массива: " << min << endl;
cout << "Его индекс: " << min_index << endl;
system("pause");
}
uses
SysUtils;
Var
C:string;
i:integer;
begin
Read(C);
if Length(C) mod 4 <> 0 then
For i:= 1 to 4-Length(C) mod 4 do
C:='0'+C;
For i:= 1 to Length(C) div 4 do
Case StrToInt(C[4*i-3]+C[4*i-2]+C[4*i-1]+C[4*i]) of
0000:Write(0);
0001:Write(1);
0010:Write(2);
0011:Write(3);
0100:Write(4);
0101:Write(5);
0110:Write(6);
0111:Write(7);
1000:Write(8);
1001:Write(9);
1010:Write('A');
1011:Write('B');
1100:Write('C');
1101:Write('D');
1110:Write('E');
1111:Write('F');
End;
ReadLn;
end.