here's my condition:
int count =0;
if (percent >100){
count = 1;
value = 50;
}
else if (percent >=90 || percent <100){
count = 1;
value = 40;
}
.
.
.
I want to get the counter in the particular ramge of percentage and sum the value up...for example if i get the counter of 4 in the percentage range > 100, the result will return the count = 4, the sum value =(4*50) = 200.
The question is, how to store the value and sum up of them as well as to get the counter?? Becoz the data will loop inthe database...Using vector, or linklest, or array???
Who can show some sample codes for me??
int count =0;
if (percent >100){
count = 1;
value = 50;
}
else if (percent >=90 || percent <100){
count = 1;
value = 40;
}
.
.
.
I want to get the counter in the particular ramge of percentage and sum the value up...for example if i get the counter of 4 in the percentage range > 100, the result will return the count = 4, the sum value =(4*50) = 200.
The question is, how to store the value and sum up of them as well as to get the counter?? Becoz the data will loop inthe database...Using vector, or linklest, or array???
Who can show some sample codes for me??