+ 2

Write a program in C++ to print "Hello World" but the program should not contain any semicolon.

I got this question in one of the programming competition. I solved it using if..else , is there any other way to do it?

19th Mar 2019, 4:00 PM
Vineet Vijayagopal
Vineet Vijayagopal - avatar
3 ответов
+ 4
while(cout<<"Hello world") { break; }
19th Mar 2019, 5:17 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
+ 2
#include<iostream.h> void main(){ if(cout<<"Hello World"){} }//My solution to the question
19th Mar 2019, 4:08 PM
Vineet Vijayagopal
Vineet Vijayagopal - avatar