Write a program to display numeric value in reverse order.
Ex: I have given a number like 7584, It should display in
reverse order like 4857.

Answer Posted / pankaj

int n=1856,rem,n1,temp=0;

for(int i=0;n>=1;i++)
{
rem=n%10;
n=n/10;
temp=(temp*10)+rem;
}

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by the deployment descriptor?

504


What do you understand by actionform?

480


Is java an assembly language?

477


What is web container in j2ee?

533


On which platform j2ee is based?

523






Is java is a technology?

521


What are the technologies a java developer must know?

472


What does j2ee stand for?

478


What is isv?

508


What is component-managed sign-on ?

533


What is callback methods Component methods called by the container to notify the component of important events in its life cycle?

529


What should a junior java developer know?

475


What is comment?

533


What does web module contain?

522


What are the main components of a class in java?

488