Created
April 29, 2016 02:42
-
-
Save merlinnusr/37b68228bc6f54a22f4dede79a17ee67 to your computer and use it in GitHub Desktop.
TAREA CUCEI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main () | |
{ | |
int Matriz[5][5]={{1,2,3,4,5}, | |
{6,7,8,9,10}, | |
{11,12,13,14,15}, | |
{16,17,18,19,20}, | |
{21,22,23,24,25}}; | |
int suma_columna; | |
for(int i=0;i<5;i++) | |
{ | |
suma_columna=0; | |
for(int c=0;c<5;c++) | |
{ | |
cout<<"La posicion--> ["<<i<<c<<"]"<<" con valor de: "<< Matriz[c][i]<<"\n"; | |
suma_columna+=Matriz[c][i]; | |
if(c==4) | |
{ | |
cout<<"La columa--> "<< i<<" suma un total de: "<< suma_columna<<"\n"; | |
suma_columna=0; | |
} | |
} | |
} | |
system("PAUSE"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment