C+++ formatted cout
-
I'm gonna have to get 6 0 on C, it's gonna be like,
int x = 0;
printf("%06d\n", x);
How do you put it on the plus side?
-
#include <iostream> #include <iomanip> int main() { int x = 0; std::cout << std::setw(6) << std::setfill('0') << x << '\n'; }