Appunti per Scuola e Universitą
humanisticheUmanistiche
Appunti e tesine di tutte le materie per gli studenti delle scuole medie riguardanti le materie umanistiche: dall'italiano alla storia riguardanti le materie umanistiche: dall'italiano alla storia 
sceintificheScientifiche
Appunti, analisi, compresione per le scuole medie suddivisi per materie scientifiche, per ognuna troverai appunti, dispense, esercitazioni, tesi e riassunti in download.
tecnicheTecniche
Gli appunti, le tesine e riassunti di tecnica amministrativa, ingegneria tecnico, costruzione. Tutti gli appunti di AppuntiMania.com gratis!
Appunti
informatica
CComputerDatabaseInternetJava
Linux unixReti


AppuntiMania.com » Informatica » Appunti di computer » Programma che mette in ordine un vettore

Programma che mette in ordine un vettore




Visite: 1066Gradito:apreciate 5-stela [ Picolo appunti ]
Leggi anche appunti:

Tesina di maturitą di: Che cos'č eBay


Tesina di maturitą di: Che cos'č eBay eBay č una societą che vende

Programmazione e controllo


PROGRAMMAZIONE E CONTROLLO concetto d'azienda L'azienda č un sistema

Il futuro - DVD


Il futuro - DVD Il DVD rappresenta probabilmente l'unica vera novitą nel
immagine di categoria

Scarica gratis Programma che mette in ordine un vettore

PROGRAMMA CHE METTE IN ORDINE UN VETTORE  


Program uno;

uses crt;

const n=10;

var a:array[1..n]of integer;

I, j, aux:integer;

begin

clrscr;

randomize;

writeln('vettore casuale');

for i:=1 to n do

a[i]:=random(100);

for i:=1 to n do

writeln(a[i]);

for I:=1 to n-1 do

begin

for j:=I+1 to n do

if a[I]>a[j] then

begin

aux:=a[j];

a[j]:=a[I];

a[I]:=aux;

end;

end;

writeln('vettore ordinato');

for i:=1 to n do

writeln(a[I]);

readln;

end.


PROGRAMMA CHE METTE IN ORDINE LE PAROLE  


Program due;

uses crt;

const n=10;

var a:array[1..n]of string;

I, j:integer;

aux:string;

begin

clrscr;

randomize;

writeln('vettore casuale');

for i:=1 to n do

begin

writeln('parola',i);

readln(a[i]);

end;

for I:=1 to n-1 do

begin

for j:=I+1 to n do

if a[I]>a[j] then

begin

aux:=a[j];

a[j]:=a[I];

a[I]:=aux;

end;

end;

writeln('vettore ordinato');

for i:=1 to n do

writeln(a[I]);

readln;

end.


PROGRAMMA CHE FA LA SOMMA DI MATRICI


program tre;

uses crt;

var m,a,s:array[1..10,1..10]of integer;

i,j :integer;

begin

clrscr;

randomize;

writeln('matrice 1');

for i:=1 ta 10 do

begin

for j:=1 to 10 do

begin

m[i,j] :=random(100);

write(m[i,j] :4);

end;

writeln;

end;

writeln('matrice 2');

for i:=1 to 10 do

begin

for j:=1 to 10 do

begin

a[i,j] :=random(100)

write(a[i,j] :4);

end;

writeln;

end;

write1n('matrice somma');

for i:=1 to 10 do

begin

for j:=1 to 10 do

begin

s[I,j]:=m[I,j]+a[I,j];

write(s[i,j] :4);

end;

writeln;

end;

readln;

end.


PROGRAMMA CHE DATO UN NUMERO P  DA TUTTI QUELLI MINORI

program quattro;

uses crt;

var m:array[l. .10,1. .10]of integer;

i, j , p, max, rmax, cmax: integer;

begin

clrscr;

randomize;

writeln ('dammi il numero');

readln(p);

for i:=1 to 10 do

begin

for j:=1 to 10 do

begin

m[i,j] :=random(100);

write(m[i,j] :4);

end;

writeln;

end;

for i:=1 to 10 do

begin

for j:=1 to 10 do

if m[i,j]<p then

begin max:=m[i,j]

rmax:=i;

cmax:=j;

writeln ('il numero ',max);

writeln ('riga', rmax);

writeln ('colonna', cmax);

end;

end;

readln;

end.



Scarica gratis Programma che mette in ordine un vettore
Appunti su:



Scarica 100% gratis e , tesine, riassunti



Registrati ora

Password dimenticata?
  • Appunti superiori
  • In questa sezione troverai sunti esame, dispense, appunti universitari, esercitazioni e tesi, suddivisi per le principali facoltą.
  • Universitą
  • Appunti, dispense, esercitazioni, riassunti direttamente dalla tua aula Universitaria
  • all'Informatica
  • Introduzione all'Informatica, Information and Comunication Tecnology, componenti del computer, software, hardware ...