#include <iostream> using namespace std; int main() { //三目运算符 //创建三个变量A B C //A和B比较,将变量大得赋值变量C int a = 10; int b = 20; int c = 0; c = (a > b ? a : b); cout << c << endl; (a > b ? a : b )= 100; cout <<"a="<< a << endl; cout <<"b="<< b << endl; system("pause"); return 0; }