+ 1
Reverse numbers
how to reverse numbers in C program.....using function #include<stdio.h> int numbers(int); int main () { int n; printf("Enter Value Of n"); scanf("%d",&n); printf("reverse of enteres values %d",numbers(n)); } int numbers(int n ){ int reverse; while(n!=0){ reverse=reverse *10; reverse= reverse +n%10; n=n/10; return 0; } }
3 Answers
+ 1
initialize reverse=0 in function
close while loop before return 0 statement.
return value of reverse to main()
return reverse;
0
yes thanks there is one more question cal you help about that?