Walk Lightly on this PLANET and yet leave such a FOOTPRINT that cannot be erased for thousands of Years..!!!
Visit Codstech for Cyber Security related Posts !

Visitors

Thursday, February 10, 2011

C11 : Read nos and display any of the given number as user's choice


Back to Home   &  C


//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..
=========================================

Back to Home   &  C

No comments: