Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
Programa para mostrar dados formatados (C++)
SUBMITTED BY:
kaiser722
DATE:
Oct. 21, 2016, 12:40 p.m.
FORMAT:
Text only
SIZE:
432 Bytes
Raw
Download
Tweet
HITS:
685
Go to comments
Report
//Programa para mostrar dados formatados (C++)
#include <iostream>
#include <iomanip>
int main () {
int intNumber = 255;
float floatNumber = 99.9989F;
long bigNumber = 12505007L; // long int por omissão.
std::cout << "12345678901234567890";
std::cout << intNumber << std::endl;
std::cout << std::setw(6) << intNumber << std::endl;
std::cout << bigNumber << std::endl;
std::cout << floatNumber << std::endl;
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus