USING ARRAYS:
void main()
{
int a[100],n,i;
printf("How
many numbers do u want to enter:");
scanf("%d",&n);
printf("Enter
numbers:");
for(i=0;i<n;i++)
scanf("%d",&a[i]);
printf("The
entered numbers are\n");
for(i=0;i<n;i++)
printf("%d\n",a[i]);
}
OUTPUT:
How many numbers do u want to enter:4
Enter numbers:23
45
67
21
The entered numbers are
23
45
67
21
No comments:
Post a Comment