C program to store 10 array elements in variable and then display on screen

 

C program to store 10 array elements in variable and then display on screen


/*************************************

 * C program to store 10 array elements in variable and then display on screen

 * ***********************************************/


#include<stdio.h>

#include<conio.h>

void main()

{

    int i,n[10];

    //clrscr();

    printf("Which numbers you wants to store in n variable\n");

    for(i=0;i<10;i++)

    {

        scanf("%d",&n[i]);

        

    }

    printf("The array elements are\n");

    for(i=0;i<10;i++)

    {

        printf("%d\t",n[i]);

    }

    printf("\nEnd of program");

}


Which numbers you wants to store in n variable

10 20 30 40 50 60 70 80 90 100

The array elements are

10 20 30 40 50 60 70 80 90 100

End of program


टिप्पणी पोस्ट करा

0 टिप्पण्या