Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void print(int a, int base){
- int p = a;
- int len = 0;
- while(p > 0){
- len++;
- p /= 10;
- }
- while(len < base){
- base--;
- cout << "0";
- }
- if(a)
- cout << a;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement