Hello, I have a "problem" when I was programing with C::B, I going to try to express me well because my mother language is Spanish.
Well, I have this code:
#include <iostream>
using namespace std;
int main(int argc, char** argv) {
cout << "Inserte los datos de la matriz" << endl;
int m[4][3];
for (int i=0; i<4; i++) {
for(int j=0; j<3; j++) {
cin >> m[i][j];
}
}
for (int i=0; i<4; i++) {
for(int j=0; j<3; j++) {
cout << m[i][j];
}
cout << endl;
}
int s[3];
int con=0;
for (int i=0; i<4; i++) {
for(int j=0; j<3; j++) {
con= con+m[i][j];
}
s[i]=con;
con=0;
}
int mayor=0;
for (int i=0; i<4; i++) {
if (mayor<s[i]) {
mayor=s[i];
}
}
cout << "La fila con mayor sumatoria es " << mayor<< endl;
int fm=0;
for (int i=0; i<4; i++) {
for(int j=0; j<3; j++) {
fm= fm+m[i][j];
}
if(fm==mayor) {
for(int b=0; b<3; b++) {
cout << m[i][b];
}
}
fm=0;
}
return 0;
}
Basically shows the row where the sum of its components is higher, for example:
1 1 1
2 2 2
3 3 3
4 4 4
The row with the highest sum is 12 (4+4+4)
and then shows the row
4 4 4
Now the "problem"
C::B shows me this

And Dev-C++ shows this

Can you see that "657" in the output of C::B?
I broke my head for hours trying to find the error in my logic, but the logic is fine, so a run my code in Dev-C++, and it's ok
What is happen with C::B?? I don't understand
I want to use C::B

, but this "problem" make me lost a lot of time, I afraid that this happen again whith other code
