#include<stdio.h>
#include<conio.h>
void main()
{
int a[10], i;
clrscr();
//user input in Array
printf("Enter 10 elements of array: ");
for(i=0;i<=9;i++)
scanf("%d",&a[i]);
printf("\n");
//print Array
printf("The elements of Array are: \n");
for(i=0;i<=9;i++)
{
printf("%d ",a[i]);
}
getch();
}
OUTPUT:
#include<conio.h>
void main()
{
int a[10], i;
clrscr();
//user input in Array
printf("Enter 10 elements of array: ");
for(i=0;i<=9;i++)
scanf("%d",&a[i]);
printf("\n");
//print Array
printf("The elements of Array are: \n");
for(i=0;i<=9;i++)
{
printf("%d ",a[i]);
}
getch();
}
OUTPUT:
C Program to store 10 elements in an array and print them |
0 Comments
Please do not enter any spam link in the comment box.