Programa suma de matrices

Páginas: 2 (307 palabras) Publicado: 16 de marzo de 2012
#include <iostream>
using namespace std;
int row,fil,i,j;
int main()
{
cout<<endl<<endl<<" ESTE PROGRAMA SUMA Y RESTA MATRICES"<<endl<<" DE 'N' COLUMNAS Y 'M' FILAS"<<endl<<endl;
system("pause");
system("cls");
cout <<"Cuantas filas tendran las matrices? ";cin >>fil;
cout<<endl<<"Cuantas columnas tendra tu matrices? ";
cin >>row;
cout<<endl<<endl<<"En la matriz A ingresa elvalor de la posicion:"<<endl;
int matriz1[fil][row];
for (i=0;i<=fil-1;i++)
{
for (j=0;j<=row-1;j++)
{cout<<"("<<i+1<<")"<<"("<<j+1<<"): ";
cin >>matriz1[i][j];
}
}
cout<<endl;
system("pause");cout<<endl<<endl<<"En la matriz B ingresa el valor de la posicion:"<<endl;
int matriz2[fil][row];
for (i=0;i<=fil-1;i++)
{
for(j=0;j<=row-1;j++)
{
cout<<"("<<i+1<<")"<<"("<<j+1<<"): ";
cin >>matriz2[i][j];
}
}cout<<endl;
system("pause");

cout<<endl<<endl;
int matriz3[fil][row];
for (i=0;i<=fil-1;i++)
{
for (j=0;j<=row-1;j++){
matriz3[i][j]= matriz1[i][j]+matriz2[i][j];
cout << "Valor posicion "<<"("<<i+1<<")"<<"("<<j+1<<"):"<<matriz3[i][j]<<endl;
}
}
cout <<endl<<"Gracias por usar este programa "<<endl<<endl;
system("pause");
return 0;
}
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Suma De Matrices
  • Suma De Matrices En C++
  • Operaciones matrices c++ suma y resta
  • Programa En C Matrices
  • Código De Programa Para Sumar Dbs
  • programa de matrices
  • Suma de matrices en c
  • Programacion suma de matrices

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS