Здесь Вы можете найти ответы на многие вопросы или задать свой вопрос!
2^i = n
2^i = 64
i = 6 бит.
ответ. 6 бит
program xxx;
var a,s : string;
i: integer;
begin
writeln ('введите слово и символ-');
readln (s,a);
for i: =1 to length(a) do
if copy (s,i,1)=a then writeln (i);
readln
end.
var a,b,c,d,x,res: integer;
readln(x);
a: =x div 1000;
b: =x mod 10;
c: =x div 100 mod 10;
d: =x mod 100 div 10;
res: =a+b+c+d;
writeln(res);
readln;
#include < cstdlib> #include < iostream> using namespace std; int main(int argc, char *argv[]){ int n; cout< < "введите количество элементов массива."< < endl; cin> > n; int mas1[n]; int mas2[n]; for(int i=0; i< n; i++){ mas1[i] = rand()%100; //заполняем массив случайными числами от 0 до 100 if(mas1[i]%10 == 4) { mas2[i]=mas1[i]/2; cout< < "замена! "; } else {cout< < "\t"; mas2[i]=mas1[i]; } cout< < mas1[i]< < '\t'< < mas2[i]< < endl; } system("pause"); return exit_success; }
Популярные вопросы