Write a program that asks the user to enter the number of pancakes eaten for breakfast by 10 different people (Person 1, Person 2, ..., Person 10) Once the data has been entered the program must analyze the data and output which person ate the most pancakes for breakfast. ★ Modify the program so that it also outputs which person ate the least number of pancakes for breakfast. ★★★★ Modify the program so that it outputs a list in order of number of pancakes eaten of all 10 people. i.e. Person 4: ate 10 pancakes Person 3: ate 7 pancakes Person 8: ate 4 pancakes ... Person 5: ate 0 pancakes |
|
|
So I've started learning C++ |
|
|
When 'i' equals to 9, you're accessing A[10]. |
|
|
mutexe wrote: |
---|
but i see no c++ in your code. |
using namespace std;
counts as C++, I guess. Of course, that's also a bad habit :P