0
Suggest some ideas to improve this code
https://sololearn.com/compiler-playground/cCgvBq6c6kXg/?ref=app
2 Answers
+ 2
https://sololearn.com/compiler-playground/chp5PIJeRbSR/?ref=app
+ 1
Unless there is a requirement to use an array, the main code could be reduced and allow an indefinite number of input values:
int main()
{
int a;
puts("Enter the elements:");
while (scanf("%d", &a)!=EOF)
check(a);
return 0;
}