Not executing properly.Please help | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Not executing properly.Please help

#include<stdio.h> int main()//program to accept input and print on screen. { int a[5],i; printf("Enter numbers to store in array\n"); for(i=0;i<5;i++) { printf("Enter the input for index %d",i); scanf("%d",&a[i]); } for(i=0; i<5 ;i++) { printf("%d",a[i]); } return 0; }

21st Jun 2020, 5:43 AM
Coding San
Coding San - avatar
2 Answers
+ 2
Strange. I've checked with a desktop compiler, and it works fine (save the formatitng and spacing issues, which can be trivially solved).
21st Jun 2020, 5:46 AM
Felipe BF
+ 1
#include<stdio.h> int main() { int a[5],i; printf("Enter numbers to store in array\n"); for(i=0;i<5;i++) { printf("Enter the input for index %d :",i); scanf("%d",&a[i]); printf("%d\n",a[i]); } return 0; }
23rd Jun 2020, 5:05 PM
Ravi Gupta
Ravi Gupta - avatar