C++ Hello World program without using a semicolon
kw.cpp
#include <iostream>
int main()
{
    if (std::cout<<"Hello, World!\n")
    {
    }

    while (!(std::cout<<"Hello, World!\n"))
    {
    }
}
Output
kodingwindow@kw:~$ g++ kw.cpp
kodingwindow@kw:~$ ./a.out Hello, World! Hello, World! kodingwindow@kw:~$
Advertisement