C++ Online Compiler
Example: Hello World Program in C++ Using If Condition
C
C++
C#
Java
Python
PHP
main.cpp
STDIN
Run
// HELLO WORLD PROGRAM IN C++ USING IF CONDITION #include <iostream> using namespace std; // It's the main function of the program int main() { // Step-1 Display a label cout << "C++ HELLO WORLD PROGRAM" << endl; // Step-2 Use if condition to print the message bool show = true; if (show) { cout << "HELLO, WORLD!" << endl; } return 0; }
Output
Clear
ADVERTISEMENTS