Cheatography
https://cheatography.com
CITIREA
cout<<"Introduceti numarul de linii";
cin>>n;
cout<<"Introduceti numarul de coloane";
cin>>m;
for(i=1; i<=n; i++)
for(j=1; j<=m; j++)
{cout<<"a["<<i<<"]["<<j<<"]=";
cin<<a[i][j]; |
Daca n=m matricea se va numi PATRATICA.
|
|
DECLARAREA
numele_matricei[nr. de linii][nr. de coloane];
ex. a[10][10]; |
AFISAREA
for(i=1; i<=n; i++)
{for(j=1; j<=m; j++)
cout<<a[i][j];<<" ";
cout<<endl;
} |
|
|
MATRICI PATRATICE
DIAGONALA PRINCIPALA: |
DIAGONALA SECUNDARA |
pe ea: i=j |
pe ea: i+j=n+1 |
sub ea: i>j |
sub ea: i+j>n+1 |
deasupra de ea: i<j |
deasupra de ea: i+j<n+1 |
ZONELE MATRICELOR PATRATICE
ZONA DE NORD |
ZONA DE SUD |
ZONA DE EST |
ZONA DE VEST |
i<j && i+j<n+1 |
i>j && i+j>n+1 |
i<j && i+j>n+1 |
i>j && i+j<n+1 |
|
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets
More Cheat Sheets by [deleted]