Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- /*
- thousand separator,
- I'm just trying to translate it from delphi/pascal to c++, here's the original source link:
- https://www.swissdelphicenter.ch/en/showcode.php?id=774
- */
- int i;
- string inp = "1234567890987654321", sep = ".";
- int main()
- {
- i = inp.length();
- while (i > 3)
- {
- inp.insert(i - 3, sep);
- i -= 3;
- }
- cout << inp;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment