Probleme Pascal


  1. #1
    Linux user NicK2oo6 va deveni faimos in curand
    Data de inscriere
    10-11-2006
    Locaţie
    Craiova
    Varsta
    33
    Sex
    M
    Mesaje
    312
    Mesaje bazar
    312
    Putere Reputatie
    37
    Reputatie
    56
    Puncte CF
    0.5
    Usergroups:

    Exclamation Probleme Pascal

    Se da o matrice patratica:

    1 suma elementelor negative din matrice

    2 suma elementelor din matrice care se afla in intervalul [-1,9] si pe coloane pare

    3 produsul elementelor din matrice care se termina in 3 si se gasesc sub diagonala principala

    4 nr de elemente din matrice care sunt patrare perfecte si se gasesc deasupra diagolanei principale pe linii pare si coloane impare

    5 max elementelor din matrice

    6 max elementelor de pe linia p

    7 min elementelor dp col p

    8 realizati suma a 2 matrici date

    9 realizati o matrice c ce se obtine dintr-o matrice a data prin transformarea elementelor pare in 5

    10 sa se interschimbe intr-o matrice linia k cu linia p.

    Multumesc mult pentru cel/cei care ma ajuta, raman dator, stiu sunt de, ca la inceput...


    Nota: Imi trebuie doar SINTAXA RESPECTIVA, nu toata problema

    probleme rezolvate, thanks Johan
    Last edited by NicK2oo6; 04-05-2008 at 14:51.
    united by HATE, divided by TRUTH

  2. #2
    Nerds Rule The World Johan's Avatar Johan este reprezentantul tuturor, idealul unui forumist. Johan este reprezentantul tuturor, idealul unui forumist. Johan este reprezentantul tuturor, idealul unui forumist. Johan este reprezentantul tuturor, idealul unui forumist. Johan este reprezentantul tuturor, idealul unui forumist. Johan este reprezentantul tuturor, idealul unui forumist. Johan este reprezentantul tuturor, idealul unui forumist. Johan este reprezentantul tuturor, idealul unui forumist. Johan este reprezentantul tuturor, idealul unui forumist. Johan este reprezentantul tuturor, idealul unui forumist. Johan este reprezentantul tuturor, idealul unui forumist.
    Data de inscriere
    06-11-2005
    Locaţie
    Where The Wild Metal Grows
    Varsta
    35
    Sex
    M
    Mesaje
    914
    Mesaje bazar
    38
    Putere Reputatie
    42
    Reputatie
    5022
    Puncte CF
    36.0
    Usergroups:
    Np
    Dum spiro spero, dum spiro scio

    Vrei mai putine reclame? Inregistreaza-te sau logheaza-te

  3. #3
    Newcomer Gabbby93's Avatar Gabbby93 reprezinta o cantitate neglijabila
    Data de inscriere
    19-01-2009
    Locaţie
    VaLeA RoSiE
    Varsta
    31
    Sex
    M
    Mesaje
    13
    Mesaje bazar
    102
    Putere Reputatie
    31
    Reputatie
    10
    Puncte CF
    38.0

    pentru prima cerinta

    program matrice;
    var x:array[1..100,1..100] of integer;
    n,i,j,s:integer;
    begin
    write('n='); readln(n);
    for i:=1 to n do
    for j:=1 to n do
    begin
    write('x[',i,',',j,']=');
    readln(x[i,j]);
    end;
    s:=0;
    for i:=1 to n do
    for j:=1 to n do
    if x[i,j]<0 then s:=s+x[i,j];
    writeln('Suma elementelor negative din matrice este: ',s);
    end.
    Last edited by Gabbby93; 05-07-2009 at 20:10. Motiv: Automerged Doublepost

  4. #4
    Newcomer Gabbby93's Avatar Gabbby93 reprezinta o cantitate neglijabila
    Data de inscriere
    19-01-2009
    Locaţie
    VaLeA RoSiE
    Varsta
    31
    Sex
    M
    Mesaje
    13
    Mesaje bazar
    102
    Putere Reputatie
    31
    Reputatie
    10
    Puncte CF
    38.0

    pt a treia cerinta

    program matrice;
    var x:array[1..100,1..100] of integer;
    n,i,j,p:integer;
    begin
    write('n='); readln(n);
    for i:=1 to n do
    for j:=1 to n do
    begin
    write('x[',i,',',j,']=');
    readln(x[i,j]);
    end;
    p:=1;
    for i:=1 to n do
    for j:=1 to n do
    if x[i,j] mod 10=3 then p:=p*x[i,j];
    write('produsul elementel din matrice care se termina in 3 este: ',p);
    end.

    program matrice;
    var x:array[1..100,1..100] of integer;
    n,i,j,s:integer;
    begin
    write('n='); readln(n);
    for i:=1 to n do
    for j:=1 to n do
    begin
    write('x[',i,',',j,']=');
    readln(x[i,j]);
    end;
    s:=0;
    for i:=1 to n do
    for j:=1 to n do
    if (x[i,j]>=-1) and (x[i,j]<=9) then s:=s+x[i,j];
    writeln('suma elementelor din intervalul [-1,9] este: ',s);
    end.

    program matrice;
    var x:array[1..100,1..100] of integer;
    n,i,j,max:integer;
    begin
    write('n='); readln(n);
    for i:=1 to n do
    for j:=1 to n do
    begin
    write('x[',i,',',j,']=');
    readln(x[i,j]);
    end;
    max:=x[1,1];
    for i:=1 to n do
    for j:=1 to n do
    if max<x[i,j] then max:=x[i,j];
    writeln('Maximul elementelor din matrice este: ',max);
    end.

    program matrice;
    var x:array[1..100,1..100] of integer;
    n,i,j,p,max:integer;
    begin
    write('n='); readln(n);
    for i:=1 to n do
    for j:=1 to n do
    begin
    write('x[',i,',',j,']=');
    readln(x[i,j]);
    end;
    write('p='); readln(p);
    max:=x[p,1];
    for i:=1 to n do
    if max<x[p,i] then max:=x[p,i];
    writeln('Maximul elementelor din matrice este: ',max);
    end.

    program matrice;
    var x:array[1..100,1..100] of integer;
    n,i,j,p,min:integer;
    begin
    write('n='); readln(n);
    for i:=1 to n do
    for j:=1 to n do
    begin
    write('x[',i,',',j,']=');
    readln(x[i,j]);
    end;
    write('p='); readln(p);
    min:=x[1,p];
    for i:=1 to n do
    if min<x[i,p] then min:=x[i,p];
    writeln('Maximul elementelor din matrice este: ',min);
    end.

    program matrice;
    var a,b,c:array[1..100,1..100] of integer;
    n,m,i,j:integer;
    begin
    write('n='); readln(n);
    for i:=1 to n do
    for j:=1 to n do
    begin
    write('a[',i,',',j,']=');
    readln(a[i,j]);
    end;
    for i:=1 to n do
    for j:=1 to n do
    begin
    write('b[',i,',',j,']=');
    readln(b[i,j]);
    end;
    for i:=1 to n do
    for j:=1 to n do
    c[i,j]:=a[i,j]+b[i,j];
    writeln('matricea suma este: ');
    for i:=1 to n do
    begin
    for j:=1 to n do
    write(c[i,j]:4);
    writeln;
    end;
    end.

    program matrice;
    var x,c:array[1..100,1..100] of integer;
    n,i,j:integer;
    begin
    write('n='); readln(n);
    for i:=1 to n do
    for j:=1 to n do
    begin
    write('x[',i,',',j,']=');
    readln(x[i,j]);
    end;
    for i:=1 to n do
    for j:=1 to n do
    c[i,j]:=x[i,j];
    for i:=1 to n do
    for j:=1 to n do
    if c[i,j] mod 2=0 then c[i,j]:=5;
    writeln('matricea obtinuta este: ');
    for i:=1 to n do
    begin
    for j:=1 to n do
    write(c[i,j]:4);
    writeln;
    end;
    end.

    program matrice;
    var x:array[1..100,1..100] of integer;
    n,i,j,aux,k,p:integer;
    begin
    write('n='); readln(n);
    for i:=1 to n do
    for j:=1 to n do
    begin
    write('x[',i,',',j,']=');
    readln(x[i,j]);
    end;
    write('k='); readln(k);
    write('p='); readln(p);
    for i:=1 to n do
    begin
    aux:=x[p,i];
    x[p,i]:=x[k,i];
    x[k,i]:=aux;
    end;
    for i:=1 to n do
    begin
    for j:=1 to n do
    write(x[i,j]:4);
    writeln;
    end;
    end.

    program matrice;
    var x:array[1..100,1..100] of integer;
    n,i,j,ii,k:integer;
    ok:boolean;
    begin
    write('n='); readln(n);
    for i:=1 to n do
    for j:=1 to n do
    begin
    write('x[',i,',',j,']=');
    readln(x[i,j]);
    end;
    k:=0;
    for i:=1 to n do
    for j:=1 to n do
    begin
    ok:=false;
    for ii:=1 to x[i,j] div 2 do
    if x[i,j]=ii*ii then ok:=true;
    if ok then k:=k+1;
    end;
    writeln('Numarul de patrate perfecte din matrice este: ',k);
    end.
    Last edited by Gabbby93; 05-07-2009 at 20:42. Motiv: Automerged Doublepost

  5. #5
    Newcomer Gabbby93's Avatar Gabbby93 reprezinta o cantitate neglijabila
    Data de inscriere
    19-01-2009
    Locaţie
    VaLeA RoSiE
    Varsta
    31
    Sex
    M
    Mesaje
    13
    Mesaje bazar
    102
    Putere Reputatie
    31
    Reputatie
    10
    Puncte CF
    38.0

    la cerinta a 4-a era:

    program matrice;
    var x:array[1..100,1..100] of integer;
    n,i,j,ii,k:integer;
    ok:boolean;
    begin
    write('n='); readln(n);
    for i:=1 to n do
    for j:=1 to n do
    begin
    write('x[',i,',',j,']=');
    readln(x[i,j]);
    end;
    k:=0;
    for i:=1 to n do
    for j:=1 to n do
    begin
    ok:=false;
    for ii:=1 to x[i,j] div 2 do
    if x[i,j]=ii*ii then ok:=true;
    if (ok) and (i<j) then k:=k+1;
    end;
    writeln('Numarul de patrate perfecte din matrice este: ',k);
    end.

  6. #6
    0-day Member vlad danut reprezinta o cantitate neglijabila
    Data de inscriere
    27-11-2011
    Locaţie
    sighetu marmatiei
    Varsta
    28
    Sex
    M
    Mesaje
    1
    Mesaje bazar
    1
    Putere Reputatie
    0
    Reputatie
    10
    Puncte CF
    0.0

    Big grin salut

    program sir;
    uses crt;
    var nu trebuie sa faci nimic;
    for totul este sa astepti;
    writeln('dati valori asteptarii');
    readln(asteptare);
    begin
    clrscr;
    write('trebuie doar sa astepti);
    readln;
    end.

  7. #7
    Junior jessie30 reprezinta o cantitate neglijabila
    Data de inscriere
    19-11-2010
    Varsta
    43
    Sex
    M
    Mesaje
    63
    Putere Reputatie
    28
    Reputatie
    12
    Puncte CF
    20.0
    bineinteles, numai ca sectiunea "bancuri" e in alta parte!
    Edited by MOD - Semnatura. Forumul permite si crearea unei semnaturi care sa apara la sfarsitul mesajelor tale; aceasta ar trebui sa fie o fraza scurta, un citat celebru, eventual o gluma, dar care sa nu aiba dimensiuni prea mari; Deasemenea nu sunt permise link-uri directe sau tag-uri catre: site-uri, anunturi de mica publicitate, publicitate de orice fel; Ne rezervam dreptul de a edita semnaturile ce incalca regulamentul forumului fara a avertiza utilizatorul;

  8. #8
    Newcomer Jok3 reprezinta o cantitate neglijabila
    Data de inscriere
    09-10-2009
    Varsta
    32
    Sex
    M
    Mesaje
    12
    Putere Reputatie
    30
    Reputatie
    17
    Puncte CF
    0.0
    Gasesti aici o colectie de probleme in pascal rezolvate: Probleme pascal .
    Edited by MOD
    Vrei mai putine reclame? Inregistreaza-te sau logheaza-te

Google+

Cautati logo-ul CraiovaForum?

Iata cateva variante: