heeey everyone...i got one question. ok, if you have a table with 2 columns and a number of rows... in the first column there are some repeated numbers in it. now the question is, how would you compine those numbers and add their corresponding values, that are located in the second column, and display them in a screen. the values are to be read from a file.
You could use 2 arrays e.g.
[code]int a[10]={2,1,1,5,2,7,4,4,8,3};
int b[10]={1,2,3,4,5,6,7,8,9,10};
for(int i=0;i<10;i++)
col3[i]=a[i]+b[i];
cout<<col3[i];[code]//would print3,3,4,9....