Sunday, February 15, 2009

How t reverse a Int arry

# include

void main()
{

int count,i,m,x,q;
int arr[20];


printf("how many numbers u want to input???");
scanf("%d",&i);


for(m=0 ; m < i; m++ )
{
printf("Enter a number:");

scanf("%d",&arr[m]);
}


for(q=i-1;q>=0;q--)
printf("%d",arr[q]);

}

0 comments: