The first figure is the title, the second figure is my run results
#include
Int main ()
{
Int a [3], [3], I, t, j;
Printf (" do put in: \ n ");
for(i=0; i<3; I++)
{
for(j=0; j<3; J++)
{
The scanf (" % d ", & amp; A [I] [j]);
If (a [I] [j] % 3!=0)
Printf (" % 5 d, "a [I] [j]);
The else
Printf (" % 5 d \ n ", a [I] [j]);
}
}
T +=a, [I] [j].
Printf (" The result is=% d \ n ", t);
}
CodePudding user response:
T uninitialized began to t=0CodePudding user response:
I didn't learn c + +!!!!! But I see ~ ~ t +=a, [I] [j]. This should be a cumulative process!!! The additive process outside loop???? Don't know how to calculate your t is the result?CodePudding user response:
T didn't initialize, define variables when assigning a 0, and the t +=a [I] [j] why didn't in the for loop?CodePudding user response:
#includeInt main ()
{
Int a [3], [3], I, j;
Int t=0;
Printf (" do input: \ n ");
for(i=0; i<3; I++)
{
for(j=0; j<3; J++)
{
The scanf (" % d ", & amp; A [I] [j]);
If (j==2)
Printf (" % 5 d \ n ", a [I] [j]);
The else
Printf (" % 5 d, "a [I] [j]);
T +=a, [I] [j].
}
}
Printf (" The result is: % d \ n ", t);
}
CodePudding user response: