Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // goi thu vien algorithm cho ham reverse
- string num2str(int num)
- {
- string str = "";
- while (num > 0)
- str += (num % 10 + '0'), num /= 10;
- reverse(str.begin(), str.end());
- if (!str.size())
- str = 0;
- return str;
- }
Advertisement
Add Comment
Please, Sign In to add comment