Respuesta :

The code of the given query is presented below.

Program explanation:

  • Declaration of header file.
  • Declaration of main method.
  • Declaration of integer type variable.
  • Enter a value.
  • Use of if statement.

Program code:

#include <iostream>    //header file

using namespace std;

int main()   //main method

{

int userAge;

cin>>userAge;

if(userAge > 20)

{

cout<<"greater than 20" << endl;

}

else

{

cout<< "20 or less" <<endl;

}

return 0;

}

Output:

Find the attachment below.

Learn more about program code here:

https://brainly.com/question/17782638

Ver imagen Cricetus