academycoffee243
?>

Исправить ошибку(не выводит ответ)ребус ussr+usa=реасе var m: set of byte; u, s, r, a, p, e, c: integer; begin m : = []; for u : = 1 to 6 do if not (u in m) then begin include(m, u); for s : = 0 to 6 do if not (s in m) then begin include(m, s); for r : = 0 to 6 do if not (r in m) then begin include(m, r); for a : = 0 to 6 do if not (a in m) then begin include(m, a); for p : = 1 to 6 do if not (p in m) then begin include(m, p); for e : = 0 to 6 do if not (e in m) then begin include(m, e); for c : = 0 to 6 do if not (c in m) then begin include(m, c); if u * 1000 + s * 100 + s * 10 + r + u * 100 + s * 10 + a = p * 10000 + e * 1000 + a * 100 + c * 10 + e then writeln(u, s, s, r, ' + ', u, s, a, ' = ', p, e, a, c, e); exclude(m, c) end; exclude(m, e); end; exclude(m, p); end; exclude(m, a) end; exclude(m, r) end; exclude(m, s) end; exclude(m, u) end; end.

Информатика

Ответы

ziyaevak
Varm: set of byte;u,s,r,a,p,e,c: integer;beginm := [];for u := 1 to 6 doif not (u in m) thenbeginInclude(m, u);for s := 0 to 6 doif not (s in m) thenbeginInclude(m, s);for r := 0 to 6 doif not (r in m) thenbeginInclude(m, r);for a := 0 to 6 doif not (a in m) thenbeginInclude(m, a);for p := 1 to 6 doif not (p in m) thenbeginInclude(m, p);for e := 0 to 6 doif not (e in m) thenbeginInclude(m, e);for c := 0 to 6 doif not (c in m) thenbeginInclude(m, c);if u * 1000 + s * 100 + s * 10 + r +u * 100 + s * 10 + a =p * 10000 + e * 1000 + a * 100 + c * 10 + e thenWriteLn(u, s, s, r, ' + ', u, s, a, ' = ', p, e, a, c, e);Exclude(m, c)end;Exclude(m, e);end;Exclude(m, p);end;Exclude(m, a)end;Exclude(m, r)end;Exclude(m, s)end;Exclude(m, u)end;WriteLn(u, s, s, r, ' + ', u, s, a, ' = ', p, e, a, c, e);end.

{попробуй это}
yana799707
#include <iostream>
#include <cstdlib>
// содержит srand() и rand()
#include <ctime>
 using namespace std;

 int main()
{   
 int n=10;
 int mas[n] = {};
 int tmp,j=0;
 cout<<"random number";
 cout<<endl;
// начальная установка генератора случ. чисел
 srand(time(NULL));
// заполнение массива случайными числами
 for (int i = 0; i < n; i++) 
{
  mas[i] = rand()/100;  cout<<mas[i]<<" ";
}
cout<<endl;
// перестановка элементов
for (int i = 0; i < n/2; i++)
 { 
     tmp=mas[i];    mas[i]=mas[2*(i+1)-1];    j=2*i;
        while (j>i) 
    {   
        mas[j+1]=mas[j];    j--;
     }
        mas[i+1]=tmp;
}
//"массив после замены"
 for (int i = 0; i < n; i++)    cout<<mas[i]<<" ";
 cout<<endl;
 system("pause");
return 0;
}
oshemkov579
Var
a:array[1..100,1..100] of integer;
c:array[1..20,1..20] of real;
b:array[1..20,1..20] of real;
i,j,n,k:integer;
t:real;
r:integer;
begin
randomize;
t:=0;
Writeln('Введите порядок матрицы: ');
readln(n);
for i:=1 to n do
for j:=1 to n do
begin
a[i, j] := random(10); 
end;
for i:=1 to n do
for j:=1 to n do
begin
b[i,j]:=1/i+j-1;
end;
for i:=1 to n do
for j:=1 to n do
begin
for k:=1 to n do
begin
t :=t+a[i,k]*b[k, j];
end;
c[i,j]:=t;
t:=0;
end;
for i:=1 to n do
begin
for j:=1 to n do
begin
write(' ',c[i,j]:2:2);
end;
Writeln;
end;

end.

Ответить на вопрос

Поделитесь своими знаниями, ответьте на вопрос:

Исправить ошибку(не выводит ответ)ребус ussr+usa=реасе var m: set of byte; u, s, r, a, p, e, c: integer; begin m : = []; for u : = 1 to 6 do if not (u in m) then begin include(m, u); for s : = 0 to 6 do if not (s in m) then begin include(m, s); for r : = 0 to 6 do if not (r in m) then begin include(m, r); for a : = 0 to 6 do if not (a in m) then begin include(m, a); for p : = 1 to 6 do if not (p in m) then begin include(m, p); for e : = 0 to 6 do if not (e in m) then begin include(m, e); for c : = 0 to 6 do if not (c in m) then begin include(m, c); if u * 1000 + s * 100 + s * 10 + r + u * 100 + s * 10 + a = p * 10000 + e * 1000 + a * 100 + c * 10 + e then writeln(u, s, s, r, ' + ', u, s, a, ' = ', p, e, a, c, e); exclude(m, c) end; exclude(m, e); end; exclude(m, p); end; exclude(m, a) end; exclude(m, r) end; exclude(m, s) end; exclude(m, u) end; end.
Ваше имя (никнейм)*
Email*
Комментарий*

Популярные вопросы в разделе

endyurans2ooo
Nikolai_oksana
chechina6646
Ямпольский
Голубева1440
ekatef45
sveta740450
sokolowskayaa
tyrenumberone
Sergei-Gradus199
Nastyaches4
billl24
kiruha0378
борисовна Елена78
olqa27