Thursday, October 13, 2011


/* Program to reverse the digits of a number */

#include

#include

int main()

{ int num, rightdigit;

printf("Enter a number \n");

scanf("%d", &num);

while (num != 0)

{

rightdigit = num % 10;

printf("%d", rightdigit);

num = num / 10;

} printf("\n");

getch();

return 0;

}

No comments:

Followers

Visitor

free counters

FEEDJIT Live Traffic Feed