Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- using namespace std;
- ostream& tab(ostream& out) {
- out << setprecision(1);
- out << fixed;
- out << width(5);
- return out;
- }
- ostream& percent(ostream& out) {
- out << '%';
- return out;
- }
- /*** Main ***/
- int main() {
- double x = 55.55;
- cout << tab << 5555 << percent;
- //cout << "55.666" << percent << endl;
- //cout << "55.777" << percent << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement