I am learning to program C ++ and I have written the following code. Everything runs fine but in the end (when the tenth value is admitted) it stops working. I am using MSVC2015.
Can you help me with this, please?
#include "stdafx.h"
#include <iostream>
using namespace std;
int main() {
int pank[10];
for (int i = 0; i <= 10; i++) {
cout << "Cuantos pancakes se comio la persona No." << i << " " << endl;
cin >> pank[i];
}
system("pause");
return 0;
}