Hello, my name is kerry and i just sign up .Well, my question is how do reverse a number input by user using recersive function.Thanks for the help.
Kerry
0
Newbie Poster
Recommended Answers
Jump to PostHello, my name is kerry and i just sign up .Well, my question is how do reverse a number input by user using recersive function.Thanks for the help.
You mean recursive funtion.The concept is quite simple.You take a number (to be reversed) and divide it by 10 and add …
Jump to Postthe recursive code (function call itself ) will be as follow
#include <iostream> #include <cstdlib> int reverse_num (int n,int m) ; using namespace std; int main() { int n; int m=0; cout<<"enter number to reverse :"; cin>>n; cout<<reverse_num(n,0)<<endl; //calling the function system("pause") ; return 0; } int …
All 6 Replies
saadkhulsai
0
Newbie Poster
FireNet
64
Posting Whiz in Training
rishiraj_bayerd
0
Newbie Poster
let us c
0
Newbie Poster
stg110
0
Newbie Poster
c0ld sn1ff3r
-4
Newbie Poster
Salem
commented:
4 years late, nobody cares about your unportable and poorly formatted code.
-4
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.