i want to do this:

ketotal = kineticenergy[0]+kineticenergy[1]+kineticenergy[2]+kineticenergy[3]+kineticenergy[4];


but how to do it using the

[code]for(int i=0;i
ketotal = ketotal+kineticenergy[i]++;

}[/code]

how to tell the program to reset the ketotal ?