+ 2
What's my discount?
Why is my output and expected output the same, but it is still saying I am wrong? #include <iostream> using namespace std; int main() { double items[] = {500, 12.4, 94, 45, 3, 81, 1000.9, 85, 90, 1, 35}; int x; int p; cin >> p; for (int x = 0; x < 10; x++) { cout << items[x] - items[x] * p / 100<<" "; } //your code goes here return 0; }
3 Réponses
+ 3
Thanks for your reply, but i workied out that I needed to put x <<11 as the second argument in my for loop. Oops 😬
+ 2
👍
edit:
x<11, ( '<<' is left shift operator )
+ 1
What is your expected output? And your? What is actual question? Add description details...
x declared twice. you can remove one.