Bun venit Guest | RSS
Bine ati venit la 9C acasa
Meniul Site-ului
Horoscop
Exprima-ti opinia
Ce parere aveti despre site?
1. Foarte buna
2. Foarte proasta
3. Buna
4. Normal
5. Proasta
[ Vezi rezutat ยท Arhiva ]
Raspunsuri: 42
Mini chat

Info


Main » 2009 » Mai » 20 » suma matrice
suma matrice
17:13
#include<fstream.h>
#include<iostream.h>
#include<conio.h>
int n,m,a[10][10],b[10][10],c[10][10];
void main()
{
cout<<"n="; cin>>n;
cout<<"m="; cin>>m;
int i,j;
for(i=0;i<n;i++)
for(j=0;j<m;j++)
{cout<<"a["<<i<<j<<"]=";
cin>>a[i][j];}

for(i=0;i<n;i++)
for(j=0;j<m;j++)
{cout<<"b["<<i<<j<<"]=";
cin>>b[i][j];}

for(i=0;i<n;i++)
for(j=0;j<m;j++)
c[i][j]=a[i][j]+b[i][j];

for(i=0;i<n;i++){
for(j=0;j<m;j++)
cout<<c[i][j]<<" ";
cout<<endl;}}
Views: 93 | Added by: Iulian
Only registered users can add comments.
[ Registration | Login ]
Logheaza-te
Calendar
«  Mai 2009  »
DuLuMaMiJoViSa
     12
3456789
10111213141516
17181920212223
24252627282930
31
Meteo
Curs Valutar
Curs Valutar BNR
Cautare
Link-uri
Statistica
Director web gratuit - Afisare Thumbnail, Transfer Google PageRank, Meta keywords si meta description personalizate pentru fiecare link Site clasei 9C Colegiul National Mihai Eminescu, Muzica Stiri Sport, Filme Top66 Statistici
Total online: 1
Guests: 1
Users: 0