I have these codes:
I don't understand why i have to push enter every time i enter number? When I try to enter numbers horizontally with spaces i've got error message that program performed illegal operation.Code:#include <stdio.h> #include <stdlib.h> #include <conio.h> int main() { int arrayofints2[5]; int i; printf("Enter five numbers\t"); for (i=0; i<5; i++){ scanf("%d", &arrayofints2[i]); } for (i=0; i<5; i++){ printf("arrayofints2[%d]has a value of %d\n",i,arrayofints2[i]); } getch(); return 0; }
Thanks.



LinkBack URL
About LinkBacks


