fork download
#include <iostream>

using namespace std;

int main()
{
  int i;
  int j;

  cin >> i;
  cin >> j;

  if (i>0)
    cout << "i is greater than 0" << endl;

  if (i>0)
  {
     if (j>0)
       cout << "i and j are both greater than 0" << endl;
     else
       cout << "i is greater than 0 but j isn't" << endl;
  }
  else
    cout << "i is not greater than 0" << endl;

  return 0;
}
Success #stdin #stdout 0.01s 2684KB
stdin
5
-2
stdout
i is greater than 0
i is greater than 0 but j isn't