int a[100000];
using namespace std;
int main()
{
int temp,pos=0;
while(cin >> temp)
{
a[pos++] = temp;
if(cin.peek()=='\n')
break;
}
cout << *max_element(a,a+pos)<< " " << *min_element(a,a+pos);
}
int a[100000];
using namespace std;
int main()
{
int temp,pos=0;
while(cin >> temp)
{
a[pos++] = temp;
if(cin.peek()=='\n')
break;
}
cout << *max_element(a,a+pos)<< " " << *min_element(a,a+pos);
}
上一篇:hello world
下一篇:求最大公约数和最小公倍数
【HarmonyOS】 鸿蒙开发 (比较两个值大小,输出较大值)在DevEco Studio中开发,用户界面输入两个值,比较两个值大小并输出较大值。主要是练习了对TextInput属性的应用。
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M