You are on page 1of 7

№1

uses crt;
var n:integer;
begin
clrscr;
write('cifra=');
readln (n);
if n=1 then writeln('I');
if n=2 then writeln('II');
if n=3 then writeln('III');
if n=4 then writeln('IV');
if n=5 then writeln('V');
if n=6 then writeln('VI');
if n=7 then writeln('VII');
if n=8 then writeln('VIII');
if n=9 then writeln('IX');
if n>9 then write('eto ne zifra');
if n=0 then write('v rim. system of isteslenia ne bilo 0');
if n<0 then write('wrong number');
readln;
end.

№2

uses crt;
var a,b,c:integer;
begin
clrscr;
write('a=');
readln (a);
write('b=');
readln (b);
if (a>0)and(b>0) then writeln('I');
if (a<0)and(b>0) then writeln('II');
if (a<0)and(b<0) then writeln('III');
if (a>0)and(b<0) then writeln('IV');
readln;
end.

№3

uses crt;
var n:integer;
begin
clrscr;
write('den=');
readln (n);
if n=1 then writeln('monday');
if n=2 then writeln('tuesday');
if n=3 then writeln('wednesday');
if n=4 then writeln('thursday');
if n=5 then writeln('friday');
if n=6 then writeln('saturday');
if n=7 then writeln('sunday');
if (n>7) or (n<1) then writeln('tacoko dnia nety');
readln;
end.
№4

uses crt;
var x,y:integer;
begin
clrscr;
write('x=');
readln (x);
if (x>=91) and (x<=179) then write('tupiy');
if (x<=89) then writeln('gostriy');
if (x=90) then writeln('pryamiy');
if (x=180)then writeln('rozgornutiy');
if (x>=181)then writeln('bilshe rozgornutiy');
if (x>359) or (n<1) then writeln('tacoko лгеф nety');
readln;
end.

№5

uses crt;
var n:integer;
p:boolean;
begin
clrscr;
write('kilkist ochok=');
readln (n);
p:=false;
if n=1 then begin writeln ('draw'); p:=true; end;
if n=0 then begin writeln ('defeat'); p:=true; end;
if (n=3) then begin writeln ('win'); p:=true; end;
if p=false then write('nevidomo');
readln;
end.

№6

uses crt;
var t:integer;
begin
clrscr;
write('t=');
readln (t);
if t<=0 then writeln('lid');
if (t>=0) and (t<100) then writeln('voda');
if t>=100 then write('para');
readln;
end.

№7

uses crt;
var n:integer;
begin
clrscr;
write('n=');
readln (n);
if n=1 then write('31');
if n=2 then write('28');
if n=3 then write('31');
if n=4 then write('30');
if n=5 then write('31');
if n=6 then write('30');
if n=7 then write('31');
if n=8 then write('31');
if n=9 then write('30');
if n=10 then write('31');
if n=11 then write('30');
if n=12 then write('31');
if (n>12) or (n<1) then writeln('tacoko месяца nety');
readln;
end.

№8……..

uses crt;
var a,b,c:real;
begin
clrscr;
writeln('Chisla');
readln(a,b,c);
if a<1 then a:=sqr(a);
if b<1 then b:=sqr(b);
if c<1 then c:=sqr(c);
writeln(' a -> ', a:2:2,' b -> ',b:2:2,' c -> ' ,c:2:2);
readln;
end.

№9

uses crt;
var a,b,c:integer;
begin
readln(a,b,c);
if (a<b) and (a<c) then writeln('chislo ',a,' z nomerom 1');
if (b<a) and (b<c) then writeln('chislo ',b,' z nomerom 2');
if (c<a) and (c<b) then writeln('chislo ',c,' z nomerom 3');
readln;
end.

№10

uses crt;
var i:byte;
a:array[1..4] of integer;
p:boolean;
begin
clrscr;
p:=false;
for i:=1 to 4 do
begin
readln(a[i]);
end;

if
(a[1]=a[2])and(a[1]=a[3]) or
(a[1]=a[2])and(a[1]=a[4]) or
(a[1]=a[4])and(a[1]=a[3]) or

(a[2]=a[1])and(a[2]=a[3]) or
(a[2]=a[1])and(a[2]=a[4]) or
(a[2]=a[4])and(a[2]=a[3]) or

(a[3]=a[2])and(a[3]=a[1]) or
(a[3]=a[2])and(a[3]=a[4]) or
(a[3]=a[4])and(a[3]=a[1]) or

(a[4]=a[2])and(a[4]=a[3]) or
(a[4]=a[2])and(a[4]=a[1]) or
(a[4]=a[1])and(a[4]=a[3]) then p:=true;

if p=true then begin


if (a[1]<>a[2]) and (a[1]<>a[3]) and(a[1]<>a[4])then writeln('chislo ',a[1],' z
nomerom 1');
if (a[2]<>a[1]) and (a[2]<>a[3]) and(a[2]<>a[4])then writeln('chislo ',a[2],' z
nomerom 2');
if (a[3]<>a[1]) and (a[3]<>a[2]) and(a[3]<>a[4])then writeln('chislo ',a[3],' z
nomerom 3');
if (a[4]<>a[1]) and (a[4]<>a[2]) and(a[4]<>a[3])then writeln('chislo ',a[4],' z
nomerom 4');
end
else
write('nepravilne napisanna chisel');
readln;
end.

№11

uses crt;
var x1,x2,x3,x4,c:integer;
begin
clrscr;
write('Suda tri chisla ->');
readln(x1,x2,x3);
if (x1<>x2) and (x1<>x3) and (x2<>x3) then begin
if (x1>x3) and (x2>x3) then x4:=x1+x2;
if (x2>x1) and (x3>x1) then x4:=x2+x3;
if (x1>x2) and (x3>x2) then x4:=x3+x1;
writeln(x4);
end
else writeln('Oshibka');
readln;
end.

№12

uses crt;
var x1,x2,x3,x4,c:integer;
begin
clrscr;
write('Suda tri chisla -> ');
readln(x1,x2,x3);
if (x1<>x2) and (x1<>x3) and (x2<>x3) then begin
if (x1>x2) and (x2>x3) then writeln('Naybilshe ',x1,' Serednye ',x2,' Naymenshe
',x3);
if (x2>x1) and (x1>x3) then writeln('Naybilshe ',x2,' Serednye ',x1,' Naymenshe
',x3);
if (x3>x1) and (x1>x2) then writeln ('Naybilshe ',x3,' Serednye ',x1,' Naymenshe
',x2);
if (x1>x3) and (x3>x2) then writeln('Naybilshe ',x1,' Serednye ',x3,' Naymenshe
',x2);
if (x2>x3) and (x3>x1) then writeln('Naybilshe ',x2,' Serednye ',x3,' Naymenshe
',x1);
if (x3>x2) and (x2>x1) then writeln ('Naybilshe ',x3,' Serednye ',x2,' Naymenshe
',x1);

end
else writeln('error');
readln;
end.

№13

uses crt;
var den,a,b,c,d:byte;
begin
clrscr;
write('Suda Den ');
readln(den);
a:=(den-1) mod 7+1;
if (a<>0) and (a<8)
then begin
if a=1 then writeln('ponedilok');
if a=2 then writeln('vivtorok');
if a=3 then writeln('sreda');
if a=4 then writeln('chetverg');
if a=5 then writeln('pyatnica');
if a=6 then writeln('subbota');
if a=7 then writeln('voskresenie');
end
else writeln('error');
readln;
end.

№14

uses crt;
var a,b,c,d,e,f,q,q1,w:real;
begin
clrscr;

readln(a,b,c,d,e,f);

if ((a>b)and(a<c)) or ((a<b)and(a>c)) then q:= a;


if ((b>a)and(b<c)) or ((b<a)and(b>c)) then q:= b;
if ((c>a)and(c<b)) or ((c<a)and(b>c)) then q:= c;
if ((d>e)and(d<f)) or ((d<e)and(d>f)) then q1:=d;
if ((e>d)and(e<f)) or ((e<d)and(e>f)) then q1:=e;
if ((f>d)and(f<e)) or ((f<d)and(e>f)) then q1:= f;

w:=(q+q1)/2;
writeln(w:2:2);
readln;
end.

№15

uses crt;
var x,y:real;
begin
clrscr;
writeln('Suda x ->');
readln(x);
writeln('Suda y ->');
readln(y);

if (x>0) and (x<3) then writeln('Inside') ;


if (x=0) and (x=3) then writeln('On it') ;
if (x<0) and (x>3) then writeln('Outside') ;
if (y>1) and (y<2) then writeln('Inside') ;
if (y=1) and (y=2) then writeln('On it') ;
if (y<1) and (y>2) then writeln('Outside') ;
readln;
end.

№16

uses crt;
var x,y:real;
begin
clrscr;
writeln('Suda x ->');
readln(x);
writeln('Suda y ->');
readln(y);

if (x>0) and (x<3) then writeln('Inside') ;


if (x=0) and (x=3) then writeln('On it') ;
if (x<0) and (x>3) then writeln('Outside') ;
if (y>1) and (y<2) then writeln('Inside') ;
if (y=1) and (y=2) then writeln('On it') ;
if (y<1) and (y>2) then writeln('Outside') ;
readln;
end.

№17

uses crt;
var a,b,c,d:real;
p:boolean;
begin
clrscr;
readln(a);
readln(b);
readln(c);
readln(d);
p:=false;
if ((c>b) and (d>b)and (c>a)and(d>a)) or ((c<b) and (d<b)and (c<a)and(d<a))
then begin p:=true; writeln('ne spivpslo'); end;
if ((a=c) and (b=d)) or ((a=d)and(b=c)) then begin p:=true;
writeln('spivpali');end;
if (p=false)and ((((c>a) and (d>b)) or ((d>a) and (c>a))) or (((a>c) and (b>d))
or ((a>d) and (a>c)))) then begin p:=true; writeln('peretnulis'); end;
if (p=false)and ((a=d) or (b=c) or (b=d) or (a=c)) then begin p:=true;
writeln('kosanie'); end;
if p=false then write('ne spivpali');
readln;
end.

You might also like