If you didn't realize this code :
int numX;
int numY;
int numZ;
int sum1 = numX - numZ;
int sum2 = numX - numY + numZ;
int sum3 = numX + numY;
int sum4 = numX + numY + numZ;
int sum5 = numX;
int sum6 = numX - numY - numZ;
int sum7 = numX - numY;
int sum8 = numX + numY - numZ;
int sum9 = numX + numZ;
int totalA = sum1 + sum2 + sum3;
int totalB = sum4 + sum5 + sum6;
int totalC = sum7 + sum8 + sum9;
int totalD = sum1 + sum4 + sum7;
int totalE = sum2 + sum5 + sum8;
int totalF = sum3 + sum6 + sum9;
Is useless because numX,numY,numZ is not initialized. You need
to first get num* then calculate it. What you are doing is
calculating junk, then getting num* then showing the junk you
calculated.
Again get user input first into numX,numY,numZ, then calculated
whatever you need to calculate.
-------
num* = numX, numY, numZ
Last edited by firstPerson; Aug 25th, 2009 at 3:09 pm.
Reputation Points: 840
Solved Threads: 594
Senior Poster
Offline 3,862 posts
since Dec 2008