xFactorSchool.com(Beta)
How to Do Examples
Python Examples
HTML Examples
Code Examples
C Code Examples
C++ Code Examples
C# Code Examples
Java Code Examples
Python Code Examples
HTML Code Examples
CSS Code Examples
JavaScript Code Examples
Online Editor
C Code Editor
C++ Code Editor
C# Code Editor
Java Code Editor
Python Code Editor
HTML Code Editor
CSS Code Editor
JavaScript Code Editor
Practice how to use if... else if...else conditional statement in C++
C++ Online Editor
Execute Code
More C++ Sample Code
#include <iostream> using namespace std; // use std namespace to avoid std:: before cout int main() { int number = 10; if (number > 15) //This condition is false { cout << "The number is greater than 15." << endl; } else if (number == 10) //This condition is true { cout << "The number is equal to 10." << endl; // This will be executed } else { cout << "The number is not greater than 15." << endl; } return 0; }