Open main menu

CDOT Wiki β

Changes

GPU610/Team DAG

13 bytes removed, 22:49, 20 April 2013
Assignment 1
void summarizedAreaTable(float** a, float** b, int size){
 
int k = 0;
 
float sum = 0.0;
 
for(int i = size-1; i >= 0; i--){
 
for(int j = 0; j < size; j++){
 
for(int k = i; k < size; k++){
 
for(int m = 0; m <= j; m++){
 
sum += a[k][m];
 
}
 
}
 
b[i][j] = sum;
 
sum = 0.0;
 
}
 
}
}
}
------------------------------------------