0

Why should I try again? The result looks the same as the the wanted output

#include <iostream> using namespace std; int main() { double items[] = {500, 12.4, 94, 45, 3, 81, 1000.9, 85, 90, 1, 35}; //your code goes here double price=0; int a; int p=10; for(a=0;a<9;a++){ price= items[a]-items[a]*p/100; cout<<price<<" "; } return 0; }

12th Mar 2021, 3:44 AM
Bineu
1 Answer
+ 4
Because you need to declare variable p as an input. int p; cin>> p; All items should be included in the output. for(a=0;a<11;a++)
12th Mar 2021, 4:02 AM
Simba
Simba - avatar