Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (num < 0)
- {
- cout << "Negative ";
- num = (-1 * num);
- n = num / 1000;
- }
- if (n>0)
- cout << " " << Lessthan20[n] << " Thousand ";
- num %= 1000;
- n = num / 100;
- if (n > 0)
- {
- cout << Lessthan20[n] << "Hundred ";
- num %= 100;
- }
- if (num >= 20)
- {
- n = num / 10;
- if (n>0)
- cout << tens[n] << " ";
Advertisement
Add Comment
Please, Sign In to add comment