我看到这个题目时,我的思路是:
1.定义x,y,z
2.三目运算符列出关系式
3.定义一个临时变量t连接x,y和z
4.赋值求得最大值
因此,我得出的代码如下:
#include<iostream>
using namespace std;
int max(int x,int y,int z)
{
int t;
t=x>y?x
我看到这个题目时,我的思路是:
1.定义x,y,z
2.三目运算符列出关系式
3.定义一个临时变量t连接x,y和z
4.赋值求得最大值
因此,我得出的代码如下:
#include<iostream>
using namespace std;
int max(int x,int y,int z)
{
int t;
t=x>y?x