0% found this document useful (0 votes)
21 views2 pages

In Format Iva

gfh

Uploaded by

Balan Olivian
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views2 pages

In Format Iva

gfh

Uploaded by

Balan Olivian
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Ex.

1 1-1 2-7 3-8 4-5 5-4


Ex.2
Functiile sint subprogram care calculeaza si
returneaza o valoare.In calitate de parametru poate
fi o variabila,o expresie,o observatie
prima.Parametri formali sint disponibili numai in
cazul functiei.
Nr de parametric actuali trebuie sa fie egal cu nr
de par. Formali din declaratia functiei.
Ex.3 A F A F
Ex.5 Program P1;
Var x:real;
Function excuatie:real;
Var f:real;
F:=3/(4*x)+sqrt(6);ecuatie:=f; end;
Begin
Writeln(Introduceti x); readln(x);
Writeln(f(x)=,ecuatie;
Readln;
End.
Ex.8 Program P1;
Var med:real; r,max,imp,sum,I,n,j,m:integer;
A:array[1..100,1..100] of integer;
Procedure Introd;
Begin
For 1:=1 to n do
For j:=1 to m do begin
Writeln(A[,I,j,]=); readln(A[I,j]); end; end;
Procedure Afisare;
Begin;
For i:=1 to n do begin
For j:=1 to m do
Write (A[I,j]:3); end;end;
Procedure media;
Sum:=0 ; r:=0;
Begin
For i:=1 to n do
For j:=1 to m do begin
If i=1 then begin sum:=sum+A[i] ; r:=r+1; end;
end;
Med:=sum/r; Writeln(Media de e primul rind
=,med); readln;end.
Function maxim:integer;
Begin
Max:=A[1,1]
For 1:=1 to n do
For j:=1 to m do begin
If max<A[I,j then max:=A[I,j] ; end;
Maxim:=max; end;
Function impart;integer;
Begin;
imp:=0;
For i:=1 to n do
For j:=1 to m do begin

If A[i] mod 14 =0 then


imp:=imp+1;end;impart:=imp;end;
Begin
Writeln(Introd.n si m); readln(n,m);
Introd;
Afisare;
Writeln(Elementul maxim=,max);
Writeln(La 14 se impart fara rest,impart,numere
din tablou);readln;end.
Ex.9 Program P1;
Var s:string; i:integer; begin;
Writeln(Introd sir);readln(s);
For i:=1 to lengh(s) do begin
If s[i]=B then s[i]:=T;
If s[i]=b then s[i]:=t;
End;writeln(s);readln;end.
Ex10 Program P2;
Type Orange=record;
Nume,prenume:string[20]; tip_abon:string;
Nr_tel_cl:
Val_cont:integer; end;
Var A:array[1..100] of Orange;
I,n:integer;
Begin
writeln('intr. nr. de clienti:');readln(n);
for i:=1 to n do begin
writeln('intr. clientul cu numarul=',i,' din',n);
writeln('intr. Numele clientului:');
readln(A[i].Nume);
writeln('intr.Prenumele clientului');
readln(A[i].prenume);
writeln('intr.nr. telefon al clientului');
readln(A[i].nr_tel_cl);
writeln('intr.tipul abonamentului ');
readln(A[i].tip_abon);
writeln('intr.valoarea contului ');
readln(A[i].val_cont);
end;
writeln;
writeln('Lista angajatilor');
for i:=1 to n do begin
writeln('clientul',i,'din ',n);
writeln('Numele:',A[i].Nume);
writeln('Prenumele:',A[i].prenume);
writeln('nr.tel:',A[i].nr_tel_cl);
writeln('tipul abonamentului:',A[i].tip_abon);
writeln('nr.tel:',A[i].nr_tel_cl);
writeln('valoarea contului:',A[i].val_cont);
readln;
For i:=1 to n do begin
If A[i].val_cont<0 the
writeln(Clientul,A[i].nume,A[i].penume,are
valoare contului negativa;
Readln;End;End.
Ex.11:1,19,5,10,7,9,12,13,15,4,20,11,3,14,2,6,8,1
7,16,18

Program P1;
Var
i,x,j,:integer;
A:array[1..4,1..4] of integer;
Begin
For 1:=1 to 4 do
For j:=1 to 4 do begin
Writeln(A[,I,j,]=);
readln(A[I,j]); end;
For i:=1 to 4 do begin
For j:=1 to 4 do

Write (A[I,j]:3); end;


X:=0;
For 1:=1 to 4 do
For j:=1 to 4 do begin
if odd(a[i,j]) Then if x=0 then x = a[i,j] else if x> a[i,j] then x :=
a[i,j];
If x=o the write(nu-s numere impare )
End;

Write(x);
Readln;
End.

You might also like