How do we reverse a number with leading zeroes in number ? For ex: If input is 004, output should be 400.
I wrote below program but it works only when n
Leading zeroes are not represented by binary numbers (int, double, etc.) So you'll probably have to use std::string. Read the input into the string, then call std::reverse() passing the string as input.
int
double
std::string
std::reverse()