ө өңң . .
ұ ұ өңң қ :
- (), ғ ғ;
- ң қ, ө;
- ң;
- () ;
- , ;
- ( ә )
ө ң ң қ : 2.1-
() | input ndim a(n)for i=1 to ninput a(i)next i | const n=10;Var a: array [1..n] of integer;beginfor i:=1 to n do readln (a[i]); | # define N 10void main(){ int a[N];for(i=0;i<=N-1;i++) cin>>a[i]; |
қғ ғ | for i=1 to nprint a(i); " ";next i | for i:=1 to n do write (a[i]); | for(i=0;i<=N-1;i++) cout<<a[i]; |
ң қ ө | p=1for i=1 to ns=s+a(i)p=p*a(i)next i | s:=0; p:=1;for i:=1 to n do begins:=s+a[i]); p:=p*a[i]);end; | s=0; p=1;for(i=0;i<=N-1;i++) {s+=a[i]; p*=a[i];} |
ң | p=1for i=1 to nif <> then k=k+1:s=s+a(i):p=p*a(i)next i | k:=0; s:=0; p:=1;for i:=1 to n do if <> then begink:=k+1; s:=s+a[i]; p:=p*a[i];end; | k=0; s=0; p=1;for(i=0;i<=N-1;i++) if (<>) { k++; s+=a[i]; p*=a[i];} |
() | max=a(1): min=a(1)for i=2 to nif a(i)>max then max=a(i)if a(i)<min then min=a(i)next i | max:=a[1]; min:=a[1];for i:=1 to n do beginif a[i] > max then max:=a[i];if a[i] < min then min:=a[i];end; | max=a[0]; min=a[0];for(i=0;i<=N-1;i++) {if (a[i]>max) max=a[i];if (a[i]<min) min=a[i];} |
x- k- ғ | dim a(n + 1)for i=n to k step -1a(i+1)=a(i)nexta(k)=x | Var a: array [1..n+1] offor i:=n downto k do a[i+1]:=a[i];a[k]:=x; | { int a[N+1];for(i=N; i>=k; i--) a[i+1]=a[i];a[k]=x; |
k- | ... for i=k to n-1a(i)=a(i+1) next | for i:=k to (n-1) do a[i]:= a[i+1]; | for(i=k;i<=n-1;i++) a[i]=a[i+1]; |
... for i=1 to n/2swap a(i), a(n-i+1) next | for i:=1 to (n div 2) do begin:=a[i];a[i]:= a[n-i+1];a[n-i+1]:=;end | for(i=1;i<=n/2;i++) { =a[i];a[i]= a[n-i+1];a[n-i+1]=;} |
ү:
- ң. <> ө қ ө ғ . , ң ұғ, қ ғ , ң () ңғ, ң қ ғ , ...
() . ө, ң ө () ұ:
|
|
- X- k- ғ . ң ң : ң ңғ ғ ғ, ң ңғ ң ңғ ө ә ... k- ғ қ ә ң k- ғ қ.
- . n div 2 , ө ә қ ң .
.
1-: ққ N өұ (2.1-). ң әқң қғ ө ә ң қғ ғғ өң . ҳөұң қ (қ) ө ? ң ң?
2.1
:
:
өұң қғ ө өң ң қғ ғғ өң Ә
- қғ ө өң ң қғ ғғ өң ,
- өұң қ (қ) ө .
ң ә . , ң қ өң ү ң ө :
- өұң қғ ө өң ң қғ ғғ өң ң Ә
- өұң қғ ө өң ң қғ ғғ өң ң .
:
input "өұ :"; ndim x1(n), x2(n),y1(n), y2(n)for i=1 to n input x1(i), x2(i), y1(i), y2(i)nextxmax=x1(1)xmin=x2(1)ymax=y1(1)ymin=y2(2)for i=1 to n if x1(i) > xmax then xmax=x1(i) if x2(i) < xmin then xmin=x2(i) if y1(i) > ymax then ymax=y1(i) if y2(i) < ymin then ymin=y2(i)nextif xmax<xmin and ymax<ymin then print "қ ө ң : ", abs(xmax-xmin)*abs(ymax-ymin) else print " қ ө қ":
var x1, x2, y1, y2: array [1..10] of integer; n, i, xmax, xmin, ymax, ymin: integer;begin writeln (' өұ :'); readln (n); for i:=1 to n do readln (x1[i], y1[i], x2[i], y2[i]); xmax:=x1[1]; xmin:=x2[1]; ymax:=y1[1]; ymin:=y2[1]; for i:=1 to n do begin if x1[i] > xmax then xmax:=x1[i]; if x2[i] < xmin then xmin:=x2[i]; if y1[i] > ymax then ymax:=y1[i]; if y2[i] < ymin then ymin:=y2[i]; end; if (xmax<xmin) and (ymax<ymin) then writeln ('қ ө ,ң : ', abs(xmax-xmin)*abs(ymax-ymin)) else writeln (' қ ө қ');end.:
|
|
: | 1,1,9,5 2,3,5,6 4,2,7,4 | 2,2,5,4 4,3,7,6 6,1,11,2 6,4,12,8 |
ә: | қ ө | қ ө қ |
2-: қ ғ қ . ғ ө N´N ғ .
: Ө N´N ң 1- қ 1,2...,N . қ қғ 1 ғ ғ қ ә ... (2.2-). ғ ʲвҲ- ғ ( ғң ғ қ).
2.2-. ғ қ | ||||
:
input " ө="; ndim a(n,n)for j=1 to n a(1,j)=jnextrem=====ғ=========for i=2 to n rem===ңғ қ ө=== for j=1 to n a(i,j)=a(i-1,j) next x=a(i,n) for j=n to 2 step -1 a(i,j)=a(i,j-1) next a(i,1)=xnextrem====ғ==========for i=1 to n for j=1 to n print a(i,j); next printnext:
var a: array [1..10,1..10] of integer; n,i,j,x: integer;begin writeln (' ө='); readln (n); for j:=1 to n do a[1,j]:=j; {======ғ======} for i:=2 to n do begin {===ңғ қ ө===} for j:=1 to n do a[i,j]:=a[i-1,j]; x:=a[i,n]; for j:=n downto 2 do a[i,j]:=a[i,j-1]; a[i,1]:=x; end; {======ғ======} for i:=1 to n do begin for j:=1 to n do write(a[i,j]); writeln; end;end.ғ ғ ү ғ ү : x:=a[i,1]; for j:=1 to n-1 do a[i,j]:=a[i,j+1]; a[i,n]:=x;
ʳ ө
- ө ң ң ғ; ң әқ қ қ .
- - ә қ ғ ұқ қ ө .
- ғ ң қ ңғ (ғ) ғ. ң ңғ ғ (ң ңғ ғ ).
- 10 ұ ө ң ұ ң ө, ң қ, ө ң қ .
- m(10) ү ң , ң 0 .
қ ұқ
- ң ә қ қ?
- n- ?
- ʳ - (+1)- ғ ө ң , ң ?