Hi,
Is it possible to use scanf to input numbers from the keyboard and store them in a array? I know it's possible with character strings.
thnx
Hi,
Is it possible to use scanf to input numbers from the keyboard and store them in a array? I know it's possible with character strings.
thnx
#include <stdio.h>
int main(void)
{
int number[5], i;
for(i=0;i<5;i++)
scanf("%d",&number[i]);
for(i=0;i<5;i++)
printf("%d\n",number[i]);
return 0;
}
thnx worked