Posted By

mattloto on 09/26/10


Versions (?)

Not Your Ordinary Hello World

 / Published in: C++

It will spam the hell out of you

  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  5. int main() {
  6. while(true) {
  7. cout << "Hello World!" << endl;
  8. }
  9. }

Report this snippet  


RSS Icon Subscribe to comments
Posted By: openote on September 26, 2010

HAHAHAH LOLOLOL i see what you did there i'll post the pascal equivalent: program Spamhello; const a:boolean = true; begin repeat writeln('Hello World! >:D'); until a = false end.

Posted By: dragon2041 on September 27, 2010

You'd be much better off using '\n' instead of endl - you don't need a buffer flush every line, and all it will do is slow down the program.

You need to login to post a comment.