If statement will executed in the code and check only if the condition is true.
Q.) W.A.P to check number is even or not ?
#include < iostream>
using namespace std;
int main () {
int num = 18;
if (num % 2 == 0)
{
cout<<"It is even number";
}
return 0;
}
Output
It is even number