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
Printable View
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
int a[10], cnt;
for (cnt=0;cnt<10;++cnt)
{
printf("\nEnter number %d :",cnt+1);
scanf("%d", &a[cnt]);
}