实例 C++ if 语句

x
 
#include <iostream>
using namespace std;
int main() {
  if (20 > 18) {
    cout << "20 is greater than 18";
  }  
  return 0;
}
                    

输出结果

20 is greater than 18