Hello, I have put a cin inside a for so that it asks me for information but when I do it, it does it all at once. Example:
When should I order one by one? Part of the code:
int entradas,t;
cout << "Introduce el numero de entradas:";
cin >>entradas;
int ar[entradas];
for(t=0;t<entradas;t++)
cout << "Introduce un numero: ";
cin >> numero;
Does anyone know why it makes those jumps I can't enter several numbers??
Since
for
it occupies more than one instruction, you have to enclose the code in braces.