1 / 3

Probleme propuse:

1. In fiecare zi au loc miscari tectonice pe suprafata Pamantului. Un cercetator doreste sa afle valoarea maxima a magnitudinii si in ce zi apare ea raportat la luna Ianuarie (vom lua cate o valoare care va reprezenta maximul zilei). Se ia lua un n-nr de zile din luna respectiva.

cyma
Download Presentation

Probleme propuse:

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 1. In fiecare zi au loc miscari tectonice pe suprafata Pamantului. Un cercetator doreste sa afle valoarea maxima a magnitudinii si in ce zi apare ea raportat la luna Ianuarie (vom lua cate o valoare care va reprezenta maximul zilei). Se ia lua un n-nr de zile din luna respectiva. O firma are 30 de angajati. A fost realizat un raport in care au fost aranjati in ordine alfabetica. Potrivit cu performantele pe care le-a inregistrat, fiecare a primit o nota. Directorul firmei doreste sa afle valoarea maxima obtinuta, precum si numele angajatului/ angajatilor. Probleme propuse:

  2. Program maxim magnitudine: program magnitudine; var a:array[1..31]of integer; i,n,max:integer; begin write('n='); readln(n); for i:=1 to n do begin write('a[',i,']='); readln(a[i]); end; for i:= 1 to n do write(a[i],''); max:=a[1]; for i:=2 to n do if a[i]>max then max:=a[i]; writeln('magnitudinea maxima este:',max); for i:=1 to n do if a[i]=max then write(i,','); end. PROBLEMELE ANTERIOARE IN LIMBAJ PASCAL:

  3. Program performante; var v:array[1..30]of integer; i,x,max:integer; begin write('x=');readln(x); for i:=1 to x do begin write('v[',i,']='); readln(v[i]); end; for i:=1 to x do write(v[i],''); max:=v[1]; for i:=2 to x do if v[i]>max then max:=v[i]; writeln('nota maxima este:',max); for i:=1 to x do if v[i]=max then write(i,','); end. PROBLEMELE ANTERIOARE IN LIMBAJ PASCAL:

More Related