2. определи значения переменной с после выполнения фрагмента алгоритма a: =15 b: =30 b: =a*2-b/2; if a> b then c: =3*bb-a/3 else c: =3*a-4*b; 3. каково значение примет переменная у после выполнения фрагмента программы y: =1 x: =15 while x> 5 do begin x: =x-3; y: =y*x end 5 переведи десятичное число 231 (10) степени в двоичную и шеснадцатиричную систему счисления 6 переведи двоичное число 1001101(2) в десятичную систему счисления.
293
438
Ответы на вопрос:
#include< iostream> #include< cstring> using namespace std; int main() { string input=""; string key=""; std: : cout< < "enter the string to be coded: \t"; std: : getline(std: : cin,input); std: : cout< < "\nenter key: \t"; std: : getline(std: : cin,key); int keyl=key.length(); int inputl=input.length(); for(int j=0; keyl< inputl; j++) { key+=key[j]; keyl++; } cout< < "\nkey: \t"< < key; string encrypted=""; for(int i=0; i< keyl; i++) { encrypted+=key[i]^input[i]; } std: : cout< < "\nencrypted data: \t"< < encrypted; string unencrypted=""; for(int i=0; i< keyl; i++) { unencrypted+=encrypted[i]^key[i]; } std: : cout< < "\nunencrypted: \t"< < unencrypted; return 0; }
Популярно: Информатика
-
victorov11327.06.2020 08:00
-
asdasdgasf28.06.2022 00:33
-
rid84304.05.2021 06:02
-
jokjok133724.09.2022 05:41
-
спирина130.09.2022 11:23
-
санеке29.04.2022 17:11
-
stasison29.03.2023 19:21
-
робот6611.05.2022 13:31
-
MCbelko07.12.2020 03:25
-
79268888397p06sqw14.09.2022 15:52