11智能在线
新记
编程C语言程序,实现如下功能:从键盘任意输入3个整数,求出3个数中的
编程C语言程序,实现如下功能:从键盘任意输入3个整数,求出3个数中的最大值,并且显示在界面上,注意编程规范,要求输入和输出时应该添加必要的提示
举报该文章
相关建议 2016-08-06
#include <iostream>
using namespace std;
int main()
{
int a,b,c;
int max;
cout<<"请输入三个数";
cin>>a>>b>>c;
if(a>b)
{
max = b;
if(c > max)
max = c;
}
else
{
max = a;
if(c > max)
max = c;
}
cout<<"最大值是"<<c<<endl;
return 0;
}
温馨提示:内容为网友见解,仅供参考
当前网址:
https://11.t2y.org/zz/m8m78smf28s4qf8smp.html
其他看法
无其他回答
相似回答
大家正在搜
相关问题
编写一个程序,实现如下功能,从键盘上输入任意3个正整数,并求...
用C编写一个程序,从键盘输入3个整数,计算并输出3个数的和、...
C语言编写程序: 输入任意三个整数,求它们的和及平均值。
请编程实现,对于从外界任意输入的两个数或三个数(整数与整数、...
用c语言编写程序,输入3个整数,求三个数中的最大值
C语言编程题,从键盘输入任意3个数,按从小到大的顺序输出
C语言编写一个程序,实现如下功能:从键盘输入一个三位数,求各...
写出实现各功能的程序:从键盘上输入任意3个整数,并输出最大值...