Pancake Glutton

This is a simple project that uses logic (if statements) and loops (for).

The user inputs the number of pancakes ten people have eaten. It sorts the list and outputs in order.

#include <iostream>

using namespace std;

int main() {
 int numberOfPancakes[10];

 int person[10] = {1,2,3,4,5,6,7,8,9,10};
 int minPancakes = 100000;

 cout << "How many pancakes did you eat this morning?\n";

 //iterates from 0-9
 for (int i=0; i<10; i++){

 cout << "Person " << i+1 << "?";
 cin >> numberOfPancakes[i];

 }

 //SORTING USING BUBBLE SORT
 for (int i=0; i<10; i++){
 for(int j=0; j<9; j++){
 if(numberOfPancakes[j]>numberOfPancakes[j+1]){

 int temp = numberOfPancakes[j+1];
 int temp2 = person[j+1];

 numberOfPancakes[j+1] = numberOfPancakes[j];
 person[j+1] = person[j];

 numberOfPancakes[j] = temp;
 person[j] = temp2;
 }
 }
 }

 for(int i=0; i<10; i++){
 cout << "Person " << person[i];
 cout << " ate " << numberOfPancakes[i] << " pancakes." << endl;
 }

}