Fattyrivers

Untitled

May 17th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. if (num < 0)
  2. {
  3. cout << "Negative ";
  4. num = (-1 * num);
  5. n = num / 1000;
  6. }
  7. if (n>0)
  8. cout << " " << Lessthan20[n] << " Thousand ";
  9. num %= 1000;
  10.  
  11. n = num / 100;
  12. if (n > 0)
  13. {
  14. cout << Lessthan20[n] << "Hundred ";
  15. num %= 100;
  16. }
  17. if (num >= 20)
  18. {
  19. n = num / 10;
  20. if (n>0)
  21. cout << tens[n] << " ";
Advertisement
Add Comment
Please, Sign In to add comment