當(dāng)前位置:
首頁(yè) >
25-if嵌套语句
發(fā)布時(shí)間:2024/7/19
35
豆豆
#include<iostream>
using namespace std;
int main()
{int a,b,c;int smallest;cout<<"a b c"<<endl;cin>>a>>b>>c;if(a<=b)//外層條件語句{if(a<=c)//內(nèi)層條件語句smallest=a;elsesmallest=c;}else{if(b<=c)//內(nèi)層條件語句smallest=b;elsesmallest=c;}cout<<"Smallest="<<smallest<<endl;
}
總結(jié)
- 上一篇: js json过滤_如何在浏览器不崩溃的
- 下一篇: c语言求100以内整除13的最大,VB程