Programa para mostrar dados formatados (C++)


SUBMITTED BY: kaiser722

DATE: Oct. 21, 2016, 12:40 p.m.

FORMAT: Text only

SIZE: 432 Bytes

HITS: 685

  1. //Programa para mostrar dados formatados (C++)
  2. #include <iostream>
  3. #include <iomanip>
  4. int main () {
  5. int intNumber = 255;
  6. float floatNumber = 99.9989F;
  7. long bigNumber = 12505007L; // long int por omissão.
  8. std::cout << "12345678901234567890";
  9. std::cout << intNumber << std::endl;
  10. std::cout << std::setw(6) << intNumber << std::endl;
  11. std::cout << bigNumber << std::endl;
  12. std::cout << floatNumber << std::endl;
  13. }

comments powered by Disqus