//To read 10 nos and display any of the given number as user's choice
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int i,n,a[10];
printf("Enter 10 nos\n");
for(i=0;i<=n;i++)
{
scanf("%d",&a[i]);
}
//printf("Which no you want to display\n");
//scanf("%d",&n);
for(i=0;i<=n;i++)
{
printf("%d\n",a[n-1]);
}
getch();
}
----------------------------------------------------------------------------
Output
(Please correct this ..May be some error in output...)
Hint : Enter any 10 number..and the user want to display 7th number..
=========================================
No comments:
Post a Comment