i'm trying to input a set of integers from the keyboard, and then put them into an array and use in a function; the integers can be any amount, say a maximum of 100. the problem is that, i'm not getting the input right and i don't know why. the code is like this:
Code:
int main(int argc, char *argv[])
{
int array[100];
int k, n;
scanf(" %d",&array);
int i;
for (i=1; i<argc; i++){
if (array[i]=='\n')
{array[i] == '\0';
break;}
printf("values: %d", array[i]);
}
n = sizeof(array);
printf("%d\n", max(array, n));
return 0;
someone pls help me. i'm in urgent need