S01.txt ******************************* use angajati list for year(date()) - year (data_ang)>15 ?"lista persoanelor sarbatorite astazi" list for day(date())=day(data_naste)and month(date())=month(data_naste) S02.txt ******************************* use untitled sum(pret) to p ? p accept"oras" to no found=0 scan all for oras=no found=found+1 endscan if found=1 ? 'un bilet sa vandut' else ? found,' bilete vandute' endif S03.txt ******************************* use sub3 delete for upper(tip)="horror" list list for upper(actor_pp)="richard gere" S04.txt ******************************* set talk off clea close all use S4 dele file S4_p.idx accept 'Nume material=' to nm index on pret to S4_p list all for Nume_m=nm input 'funizor=' to f sum (pret*cantitate) for Cod_f=f to pt ? pt S05.txt ******************************* set talk off clea close all use S5 dime a[9] store 0 to a scan a[cod_a]=1 endscan na=0 for i=1 to 9 na=na+a[i] endfor ?'numar ateliere= ',na dime np[9] store 0 to np scan np[cod_a]=cod_a+nr_piese endscan for i=1 to 9 if np[i] S06.txt ******************************* use firma dime nm[9] store 0 to nm scan nm[Cod_atel]=nm[Cod_atel]+1 endscan max=0 for i=1 to 9 if max=np*1.1 nmp[cod_a]=nmp[cod_a]+1 endscan m=0 ap=0 for i=1 to 9 if nmp[i]>m m=nmp[i] ap=i endif endfor ?'atelierul cu cei mai multi muncitori premiati',ap S10.txt ******************************* clear use profa index on cod_atelie to c set index to c list fields nume_munci,cod_atelie calculate sum (nr_copii) to s ?"sunt",s S13.txt ******************************* use firma clear input "codul atelierului"to x append blank accept "nume_muncitor" to n replace cod_atel with x replace nr_piese with 0 s=0 nr=0 scan if cod_atel=x s=s+nr_piese nr=nr+1 endif endscan m=s/nr replace nr_piese with m ?"va trebui sa produca",m,"piese" accept "nume"to n input"cod_atelier"to x locate for (nume_munc=n)and(cod_atel=x) if found() replace cod_atel with cod_atel+1 disp else clear ?"nu ex in tabela" endif S14.txt ******************************* use firma clear calculate max(nr_piese) to m delete for nr_piese=m copy to s2 for nr_piese=m use s2 sort on nume_munc to alfa use alfa ?"lista celor transferati" list use firma calculate avg (nr_piese)to med for not deleted() ?"nr mediu de piese" ??med S15.txt ******************************* use depozit scan if cantitate1.2*stoc_neces use s3 index on cod_materi to c set index to c list S16.txt ******************************* use depozit input "cod_material" to c input "cantitate" to ca locate for (cod_materi=c) if not found() ?"produsul nu exista" else cr=cantitate-ca if cr>stoc_neces ?"cant ramasa",cr else if crM M=y[i] aut<=x[i] endif endfor ?"aut","are",M,"titluri" S20.txt ******************************* set talk off close all use s20 clear index on clasa tag a unique count to nrc dime cl[nrc] store '' to cl i=0 scan i=i+1 cl[i]=clasa endscan close index max=0 for i=1 to nrc count for clasa=cl[i] to nre count for clasa=cl[i] and promovat to nep pp=nep/nre if pp > max max=pp clc=cl[i] endif endfor ?clc accept 'clasa=' to cls list all for clasa=cls and not promovat fields nume S21.txt ******************************* set talk off close all use s21 clear for i=1 to 3 append blank input 'cod=' to cod_a accept 'denumire=' to den_a input 'calorii=' to cal gather memvar endfor list S24.txt ******************************* set talk off close all clear use s24 accept 'data=' to d dc=ctod(d) list all for data_l=dc fields cod_p,cod_m accept 'data=' to d dc=ctod(d) index on cod_p tag c unique count to nr_p dime cp[nr_p] store 0 to cp i=0 scan i=i+1 cp[i]=cod_p endscan max=0 close index for i=1 to nr_p sum pret*cantitate for cod_p=cp[i] and data_l=dc to vp if max