Пронкина_TEST1682
?>

Using a specific system computers can convert numbers, letters, and symbols into combinations of ones and zeros. what is the name for this system? ​

Информатика

Ответы

dzo-dzo
Const n=10; 
var a:array[1..n] of integer;
i,s,min:integer;
begin
writeln('Исходный массив:');
for i:=1 to n do
 begin
 a[i]:=random(21)-10;
 write(a[i]:4);
 end;
writeln;
s:=0; 
min:=a[1];
for i:=1 to n do
 begin
 if a[i]>0 then s:=s+a[i];
 if a[i]<min then min:=a[i];
 end;
writeln('s = ',s,'   min = ',min);
for i:=1 to n do
 if a[i]>0 then a[i]:=s
  else if a[i]<0 then a[i]:=a[i]-min;
writeln('Измененный массив:');
for i:=1 to n do  write(a[i]:4);
writeln;
end.

Пример:
Исходный массив:
   9  -3  -5   7   1   5  -6   9  -8   7
s = 38   min = -8
Измененный массив:
  38   5   3  38  38  38   2  38   0  38
Svetlana191
Procedure GetAB(x: integer; var a: integer; var b: integer);
begin
    a := 0;
    b := 1;
    while x > 0 do
    begin
        a := a + 1;
        b := b * (x mod 100);
        x := x div 100;
    end;
end;

var
    x, a, b: integer;

begin
    for x := 10000 to 2000000000 do
    begin
        GetAB(x, a, b);
        if (a = 3) and (b = 18) then
            Println(a, b, x);
    end;
end.

выдает такие значения
3 18 10118
3 18 10209
3 18 10306
3 18 10603
3 18 10902
3 18 11801
3 18 20109
3 18 20303
3 18 20901
3 18 30106
3 18 30203
3 18 30302
3 18 30601
3 18 60103
3 18 60301
3 18 90102
3 18 90201
3 18 180101

Выделенное наибольшее

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

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

Using a specific system computers can convert numbers, letters, and symbols into combinations of ones and zeros. what is the name for this system? ​
Ваше имя (никнейм)*
Email*
Комментарий*

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

Иванович-Васильевна1153
losevev5619
mg4954531175
Marina281
dentinnsmr467
abuley
homeo85
Шитенков
vaskravchuck
Milovidova
achernakov
Daletskaya982
yaudo47
Нозадзе_Новиков392
Ter-Pogosov_Vasilevna