+ 1
Where is my mistake?
int main() { double items[] = {500, 12.4, 94, 45, 3, 81, 1000.9, 85, 90, 1, 35}; //your code goes her double discounted = 0; double present_off; cin >> present_off; for(int x; x < 12; x++){ discounted += items[x]-(items[x]*present_off)/100; } cout << discounted << " ";
3 odpowiedzi
+ 3
I hope this helps you if there is a problem tell us
and what is supposed to be input/output.
https://code.sololearn.com/c00lJ5BQVA0i/#cpp
+ 2
Use this instead:
for(int x=0; x < 11; x++){
+ 2
And?