C++ introductory tutorial — 5 judgment statements
#include<iostream>
using namespace std;
int main(a)
{
int a=1;
int b=1;
if(a==b) // If true...
{
cout<<"Equal";
}
else // If not true...
{
cout<<"Unequal";
}
return 0;
}
Copy the code
This is the most basic conditional statement and can be learned from a case study.