#include<iostream>
using namespace std;
#include<string>

int main()
{
    //三目运算符
    int a = 10;
    int b = 20;
    int c = 0;

    c = (a > b ? a : b);
    cout << "c=" << c << endl;

    
    (a > b ? a : b) = 100;
    cout << "a=" << a << endl;
    cout << "b=" << b << endl;


    
    system("pause");
    return 0;

}

 

相关文章:

  • 2022-12-23
  • 2021-11-19
  • 2021-12-17
猜你喜欢
  • 2021-11-17
  • 2022-12-23
  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案