#include<stdio.h>
int main()
{
int n,i,j;
printf("Enter any number : ");
scanf("%d",&n);
int anik[n],rob[n];
for(i=0;i<n;i++)
{
scanf("%d",&anik[i]);
}
for(i=n-1,j=0;i>=0;i--,j++)
{
rob[j] = anik[i];
}
rob[j] = '\0';
for(i=0;i<n;i++)
{
printf("%d ",rob[i]);
}
return 0;
}
int main()
{
int n,i,j;
printf("Enter any number : ");
scanf("%d",&n);
int anik[n],rob[n];
for(i=0;i<n;i++)
{
scanf("%d",&anik[i]);
}
for(i=n-1,j=0;i>=0;i--,j++)
{
rob[j] = anik[i];
}
rob[j] = '\0';
for(i=0;i<n;i++)
{
printf("%d ",rob[i]);
}
return 0;
}
Comments
Post a Comment