Guest User

Untitled

a guest
Nov 20th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. // hello.cpp: David Noelte
  2. // Description: prints the awesome "Hello World!"
  3.  
  4. #include <iostream>
  5. #include <iomanip>
  6. using namespace std;
  7.  
  8. int main() {
  9. // changes cout to left-aligned
  10. cout << setiosflags(ios::left);
  11. // this loop handles the rows
  12. for (int i = 0; i < 6; i++) {
  13. // this loop handles the columns
  14. for (int i = 0; i < 4; i++)
  15. // setw(int) sets the column with
  16. cout << setw(20) << "Hello World! ";
  17. // this ends the line in the first loop
  18. cout << endl;
  19. }
  20. return 0;
  21. }
Add Comment
Please, Sign In to add comment