avakarica
?>

Числа в переменные a, b и c и напишите программу, которая меняет местами значения переменных по следующей схеме, чтобы в переменной а оказалось первоначальное значение переменной с, в переменной b – значение а, в переменной с – значение b. написать программу в pascal abc

Информатика

Ответы

delfinmos
Var a,b,c,m,n: integer; begin writeln('введи а,b,c'); readln(a,b,c); m: =a; n: =b; a: =c; b: =m; c: =n; writeln(a,b,c); readln; end.
dedald
Тут либо фото нужно,либо тебе так не скажут.
emaykova785
Program test; uses crt; var   arr: array[1..5,1..10] of integer;   vec: array[1..10] of integer;   i,j: integer; begin   clrscr;   randomize;   for i: =1 to 5 do       begin       for j: =1 to 10 do           begin               arr[i,j]: =random(19)-9;               write(arr[i,j],' ');           end;       writeln;       end;   for j: =1 to 10 do       begin           vec[j]: =abs(arr[1,j]);           for i: =1 to 5 do               if vec[j]> abs(arr[i,j]) then vec[j]: =abs(arr[i,j]);       end;     writeln;   for i: =1 to 10 do       write(vec[i],' '); end.
ЕленаГерасимова
Я  здесь  и  для  *(умножения  тоже  сделал) program gt; label 1; var a: string; i,l,s,s2,s3,j: longint; begin read(a); l: =length(a); s: =0; s2: =0; for i: =1 to l do begin if (a[i]='+')or(a[i]='-')or(a[i]='*')then goto 1; end; 1: for j: =1 to i-1 do begin if a[j]='1' then s: =s*10+1; if a[j]='2' then s: =s*10+2; if a[j]='3' then s: =s*10+3; if a[j]='4' then s: =s*10+4; if a[j]='5' then s: =s*10+5; if a[j]='6' then s: =s*10+6; if a[j]='7' then s: =s*10+7; if a[j]='8' then s: =s*10+8; if a[j]='9' then s: =s*10+9; if a[j]='0' then s: =s*10+0; end; for j: =i+1 to l do begin if a[j]='1' then s2: =s2*10+1; if a[j]='2' then s2: =s2*10+2; if a[j]='3' then s2: =s2*10+3; if a[j]='4' then s2: =s2*10+4; if a[j]='5' then s2: =s2*10+5; if a[j]='6' then s2: =s2*10+6; if a[j]='7' then s2: =s2*10+7; if a[j]='8' then s2: =s2*10+8; if a[j]='9' then s2: =s2*10+9; if a[j]='0' then s2: =s2*10+0; end; if a[i]='+' then s3: =s+s2; if a[i]='-' then s3: =s-s2; if a[i]='*' then s3: =s*s2; writeln(s3); end. 2)более  проще program gt; label 1; var a: string; i,l,s,s2,s3,j: longint; begin read(a); l: =length(a); s: =0; s2: =0; for i: =1 to l do begin if (a[i]='+')or(a[i]='-')or(a[i]='*')then goto 1; end; 1: for j: =1 to i-1 do begin s: =s*10+ord(a[j])-48; end; for j: =i+1 to l do begin s2: =s2*10+ord(a[j])-48; end; if a[i]='+' then s3: =s+s2; if a[i]='-' then s3: =s-s2; if a[i]='*' then s3: =s*s2; writeln(s3); end.

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

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

Числа в переменные a, b и c и напишите программу, которая меняет местами значения переменных по следующей схеме, чтобы в переменной а оказалось первоначальное значение переменной с, в переменной b – значение а, в переменной с – значение b. написать программу в pascal abc
Ваше имя (никнейм)*
Email*
Комментарий*