Documente Academic
Documente Profesional
Documente Cultură
1. Ce valoare va lua variabila x după executarea fiecărei dintre instrucţiunile ce urmează. Se consideră că a=21;
b=-12 şi p=False
if a>b then x:=5 else x:=-7; x=......5......
if a<b then x:a+b else x:=a-b; x=......33....
if p then x:=abs(b) else x:=a; x=.....a.......
if not p then x:=0 else x:=1; x=.....0.......
if (a>b) or p then x:=-1 else x:=1; x=............
2. In tabelul de mai jos scrieti formatul general al instrucțiunilor : FOR, IF, CASE
Instrucţiunea for Instrucţiunea if Instrucţiunea case
For i:=1 to a do ; If x=y then else ; Case x of end;
For i:= to a downto ; If x=y then
3
∗4
4
∗5
6*. Scrieţi 3 programe PASCAL ce va calcula produsul 5 ;unde n- nuăr natural – cu for,
∗…∗n−1
6
n
while și repeat
1-4 –obligatorii, 6*-opțional
Fisa de trimis la posta : snegur.tatiana@mail.ru –pina la data de 31.03.20