1 / 3

TEMA DE CASA

TEMA DE CASA. PROBLEMA:. Un elev doreste sa aiba evidenta mediilor obtinute intr-o luna de scoala.Acesta vrea sa afle cea mai mare nota obtinuta pe parcursul acestei luni si in ce zile ale lunii a obtinut-o. REZOLVARE:. PROGRAM VECTOR; VAR V:ARRAY[1..35] OF INTEGER;

jorryn
Download Presentation

TEMA DE CASA

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. TEMA DE CASA

  2. PROBLEMA: • Un elev doreste sa aiba evidenta mediilor obtinute intr-o luna de scoala.Acesta vrea sa afle cea mai mare nota obtinuta pe parcursul acestei luni si in ce zile ale lunii a obtinut-o.

  3. REZOLVARE: PROGRAM VECTOR; VAR V:ARRAY[1..35] OF INTEGER; I,N,MAX:INTEGER; BEGIN WRITE (‘N=‘);READLN(N); FOR I:=1 TO N DO BEGIN WRITE(‘V[‘,I,’]=‘); READLN(V[I]); END; FOR I:=1 TO N DO WRITE (V[I],’ ‘); MAX:=V[1]; FOR I:=2 TO N DO IF V[I]>MAX THEN MAX:=V[I]; WRITELN(‘VALOAREA MAXIMA ESTE:’,MAX); FOR I:= 1 TO N DO IF V[I] =MAX THEN WRITE (I,’,’); END.

More Related