Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
29Activity
0 of .
Results for:
No results containing your search query
P. 1
Programarea calculatoarelor. Aplicaţii în limbajul PASCAL

Programarea calculatoarelor. Aplicaţii în limbajul PASCAL

Ratings:

5.0

(1)
|Views: 1,758|Likes:
Published by Cătălin

More info:

Published by: Cătălin on May 05, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

05/11/2014

pdf

text

original

Cuprins
1. Lucrul cu masive memorate \u00een zona HEAP.......................................................
3
2. Implementarea structurii de list\u0103 \u00een limbajul Pascal...................................
11
3. Grafuri. Implement\u0103ri \u00een limbajul Pascal........................................................
39
4. Arbori......................................................................................................................
48
5. Algoritmi recursivi. Metodele divide et impera\u015fibacktracking............
54
6. Reprezentarea vizual\u0103 a datelor.......................................................................
75
7. Obiecte \u00een Pascal..................................................................................................
87
Bibliografie................................................................................................................. 100
1. LUCRUL CU MASIVE MEMORATE
\u00ceN ZONA HEAP
Problema 1. Fiex un vector de numere reale, preluat de la tastatur\u0103 \u015fi
memorat dinamic. Scrie\u0163i programul Pascal pentru sortarea luix.
uses crt;

type
vector=array[1..100] of real;
pvect=^vector;

varx:pvect;
i,j,n:byte;
aux:real;

begin
clrscr;
write('Dimensiunea:');
readln(n);
new(x);
writeln('Elementele vectorului:');
for i:=1 to n do

begin
write('x[',i,']=');
readln(x^[i]);
end;

for i:=1 to n-1 do
for j:=i+1 to n do

if x^[i]>x^[j] then
begin
aux:=x^[i];
x^[i]:=x^[j];
x^[j]:=aux;
end;

writeln('Vectorul sortat');
for i:=1 to n do
write(x^[i]:7:2,' ');

dispose(x);
readln;
end.

3

Activity (29)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Bosslucian liked this
Grasu Leonard liked this
Vadim Corcescu liked this
Florinela Popa liked this
pukea liked this
Ion Temciuc liked this
MarianStoica liked this
Daniel Ionescu liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->