.



1

Program

Task1;

uses WinCrt;

var

a, e, d, s, t, s1, p : integer;

begin

write(' '); readln(a);

e := a mod 10; a := a div 10;

d := a mod 10; a := a div 10;

s := a mod 10; t := a div 10;

s1 := e + d + s + t; { }

p := e*d*s*t; { }

writeln(' ', s1);

writeln(' ', p)

end.


2

2

Program Task2_2;{ }

uses WinCrt;

var

a, b, c : integer;

begin

write(' '); readln(a);

write(' '); readln(b);

if a = b then writeln(' ')

else if a > b then writeln(' ', a)

else

writeln(' ', b)

end.

3

Program Task2_3;{ }

uses WinCrt;

var

a : integer;

begin

write(' '); readln(a);

if a >= 0 then writeln(' ', a, ' ', a)

else writeln(' ', a, ' ', -a)

end.

3

Program

Task3; { ax = b }

uses WinCrt;

var

a, b : real;

begin

write(' '); readln(a);

write(' '); readln(b);

if

a <> 0 then writeln(' ', b/a:6:3)

else if (a = 0) and (b <> 0)

then

writeln(' ')

else writeln(' / ')

end.

4

Program

Task4; { ? }

uses WinCrt;

var

a, s, d, e : integer;

begin

write(' '); readln(a);

e := a mod 10; a := a div 10; d := a mod 10; s := a div 10;

if (s mod 2 = 0) or (d mod 2 = 0) or (e mod 2 = 0)

then writeln(' ')

else writeln(' ')

end.