cpp if or code example
Example 1: if c++
int x = 20;
int y = 18;
if (x > y) {
cout << "x is greater than y";
}
Example 2: if c++
#include<iostream>
using namespace std;
int main(){
int eta;
cout<<"Ciao Utente inserisci la tua eta'! "<<"\n";
cin>>eta;
if(eta >= 18){
cout<<"Benvenuto al cinema!";
}
}