Wednesday, 6 August 2014

#include<stdio.h>
#include<conio.h>
int main()
{
int n,i,k,lb,ub,A[10];
printf("enter the total no of array");
scanf("%d",&n);
printf("enter the no of element");
for(i=1;i<n;i++)
      {
printf("element no[%d] is",i);
scanf("%d",&A[i]);
     }
}
 lb=1;
ub=n;
k=lb;
printf("/n/n");
printf("transversing of array in");
while(k<=lb)
{
printf("element no [%d] in %d",k,A[k]);
k=k+1;
}
getch();
}


    output    enter the total no of array 3
                  enter the no of array
                  element no[1] 9
                  element no[2] 5
                  element no [3] 4
               transversing element is
                element no[1] 9
                element no[2] 5
               element no[3] 4
ashu sharma

No comments:

Post a Comment

Note: only a member of this blog may post a comment.