I had written the code and it is working completely fine, but here it shows run time error. I had also attached my code here, please guide me where did i go wrong?
Run time error appears
Mistakes:
- at line number: 28
-
your mistake??
if(count==item) -
Correct Condition
if (count >= item) -
why??
Because shopkeeper has to tell at least number of items not exact.
- at line number: 6
-
your mistake??
int a[100]; -
Correction
int a[100000]; -
why??
Because constraints require large size of array:
Modified code : https://ide.codingblocks.com/s/639276
I hope this help, if you have further doubt
feel free to ask.