C Program to store 10 elements in an array and print them| C Program

 
#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:

C Program to store 10 elements in an array and print them
 C Program to store 10 elements in an array and print them

Post a Comment

0 Comments