Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- using namespace std;
- basic_string<char> liczba_na_napis(int liczba){
- string napis = "";
- while (liczba > 0) {
- char c = (liczba % 10) + '0';
- napis += c;
- liczba /= 10;
- }
- return napis;
- }
- int main(){
- int number = 12345;
- cout << liczba_na_napis(number);
- }
Advertisement
Add Comment
Please, Sign In to add comment