Jump to content

FunlOvEe

Users
  • Content Count

    21
  • Joined

  • Last visited

Community Reputation

35 Положительно

About FunlOvEe

  • Rank
    Рядовой пользователь
  1. interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls, Grids; type TForm1 = class(TForm) Button1: TButton; Label1: TLabel; Timer1: TTimer; StringGrid1: TStringGrid; StringGrid2: TStringGrid; Button2: TButton; Edit1: TEdit; Edit2: TEdit; procedure Timer1Timer(Sender: TObject); procedure Button1Click(Sender: TObject); procedure FormCreate(Sender: TObject); procedure Button2Click(Sender: TObject); procedure StringGrid1SetEditText(Sender: TObject; ACol, ARow: Integer; c
  2. Bufalo uses crt; var i,s:integer; begin clrscr; for i:= 10 to 99 do s := s+i; writeln(s); readkey; end. var i,s,n,c,d:integer; begin clrscr; write('Vvedite n: '); read(n); write('Vvedite d: '); read(d); for i := 1 to ( n div 2 ) do if ( n mod i = 0 ) then begin if ( i div 2 <> 0 ) then s := s + i; inc(c); end; Write('Summa = ',s,', kolvo delit = ',c); c:=0; for i := d+1 to ( n div 2 ) do if ( n mod i = 0 ) then inc(c); write(', kolvo delitelei > d = ', c); readkey; end.uses crt;
  3. var X: array[1..10] of integer; i,mini,min: integer; begin clrscr; for i := 0 to 10 do begin write('vvedite ',i,'ii element :'); read(x[i]); end; min := x[1]; for i := 2 to 10 do if ( x[i] < min ) then begin min := x[i]; mini := i; end; write('Min element = ', min,' nomer = ', mini); readkey; end.uses crt; var age,sex:byte; begin clrscr; Write('Vvedite vozrast: '); readln(age); Write('Vvedite pol(0 zhen, 1 muzh): ') readln(sex); if ( sex = 0 ) then write('Do pensii ostalos ', 55-age,' let'); else write(
  4. MAZoX, uses crt; добавь в код в начале перед var.
  5. ght var a,b,c,i:integer; begin write(' vvedite A, B, C: ' ); read(a,b,c); for i := a to b do if ( i mod c = 0 ) then write(i:4); end.
  6. ght const n = 7; var c: array[1..n] of integer; s,i: integer; begin clrscr; for i := 1 to n do begin write( 'c[',i,'] = ' ); read( c[i] ); end; s := 1; for i := 1 to n do s := s * c[i]; if ( s < 0 ) then writeln( abs(s) ) else writeln(s); readkey; end.uses crt; const n = 7; var c: array[1..n] of integer; s,i,max,min,maxi,mini: integer; begin clrscr; for i := 1 to n do begin write( 'c[',i,'] = ' ); read( c[i] ); end; max:= c[1]; min:= c[1]; for i := 1 to n do if ( max < c[i] ) then begin max := c[i];
  7. Digma var i,n,sum:integer; begin clrscr; write(' N = ' ); readln(n); for i:=1 to n div 2 do if n mod i = 0 then sum:= sum + i; if ( sum = n) then writeln(' Число ',n, ' совершенное') else writeln(' Число ',n, ' несовершенное'); readkey; end. uses crt; var n,i:integer; x,y:real; function f(n:integer):integer; begin if n = 0 then f := 1 else f := n*f(n-1); end; function s(x,n:real):real; var t:real; begin t := Abs(x); if x < 0 then s:= (-1)*exp(n*Ln(t)) else s:= exp(n*Ln(t)); end; begin clrscr; x := 0; y := f(5)/( s(4,5)+f(4) /
  8. ght var i:integer; begin clrscr; for i:= 10 to 99 do if ( ( sqr( i div 10 ) + sqr( i mod 10 ) ) mod 13 = 0 ) then write( i:3 ); readkey; end. uses crt; var n,i:integer; a,p:real; function sum(n:integer):integer; begin if n = 0 then sum := 0 else sum := n+sum(n-1); end; begin clrscr; write('a = '); readln(a); write('n = '); readln(n); p := a; for i:=2 to n do begin p := p * sum(i); end; write('Ответ: ',p:5:2); readkey; end.uses crt;
  9. FunlOvEe

    Diablo II

    Залейте на фтп Diablo II.exe плз.
  10. X-tender Задание не так понял. Тогда надо sum повыше занулить до цикла или ваще убрать, иначе будет 0 или 1. const m=4; n=6; var i,j,t,sum:integer; a:array[1..m,1..n] of integer; begin clrscr; for i:=1 to m do for j:=1 to n do begin write('a[',i,',',j,'] = '); read(a[i,j]); end; for i:=1 to m do begin t:=1; for j:=1 to n div 2 do if (a[i,j*2] mod 2 = 0) then t:=0; sum:=sum+t; end; writeln(sum); readkey; end.uses crt;
  11. Галсан const m=4; n=6; var i,j,t,sum:integer; a:array[1..m,1..n] of integer; begin clrscr; for i:=1 to m do for j:=1 to n do begin write('a[',i,',',j,'] = '); read(a[i,j]); end; for i:=1 to m do begin t:=1; sum:=0; for j:=1 to n div 2 do begin if (a[i,j*2] mod 2 = 0) then t:=0; sum:=sum+t; end; writeln(sum); end; readkey; end.uses crt;
  12. мб кому-нибудь пригодится #include #include #include #include #include using namespace std; struct decart { int x; int y; }; int cos4[] = {1, 0, -1, 0}; int sin4[] = {0, 1, 0, -1}; int n1, n2; struct decart *line1, *line2, *nline1, *nline2; // true, если три точки образуют прямую линию bool isline(struct decart *p) { return (p[0].x * p[1].y + p[1].x * p[2].y + p[2].x * p[0].y) - (p[0].y * p[1].x + p[1].y * p[2].x + p[2].y * p[0].x) == 0; } // return: true - присоединение найденного отрезка слева // false - присоединение найденного отрезка справа bool is
×
×
  • Create New...