1. Scrieti un program care afisează urmatoarele doua cazuri:
ooooo
ooo
o
2.Scrieti un program/programe care afisează rezultatul expresiilor matematice de mai jos:
a) a+b-c*d
b) a+b-(c*d)
c) a+(b-c)*d
d) rad din (a + b − c ∗ d)
e)rad din ( a la patrat plus b la patrat) , foloseste functiile power si sqrt

Răspuns :

1.Program P1;

begin

readln (o);

writeln (ooooo);

writeln(ooo);

writeln(o);

end.

2. a)

Program P1;

var a,b,c,d,x : integer;

begin

readln(a,b,c,d,x);

x:=a+b-c*d;

writeln (x);

end.

b)Program P2;

var a,b,c,d,x : integer;

begin

readln(a,b,c,d,x);

x:=a+b-(c*d);

writeln (x);

end.

c)Program P3;

var a,b,c,d,x : integer;

begin

readln(a,b,c,d,x);

x:=a+(b-c)*d;

writeln (x);

end.

d)Program P4;

var a,b,c,d,x : integer;

begin

readln(a,b,c,d,x);

x:=sqrt(a+b-c*d);

writeln (x);

end.

e)Program P5;

var a,b,c,d,x : integer;

begin

readln(a,b,x);

x:=sqrt(sqr(a)+sqr(b));

writeln (x);

end.