一本通 歌手大赛
[题目分析]
需要画出流程图分析。
[参考代码]
#include <iostream>
using namespace std;
int main()
{
int a,b,c,d,e;
cin >> a >> b >> c >> d >> e;
if( e > c){
if( e > d){
if( a > b){
cout << b*e*2+(a-b)*c << endl;
}else{
cout << a*e*2+(b-a)*d << endl;
}
}else{
cout << a*c+b*d << endl;
}
}else{
cout << a*c+b*d << endl;
}
return 0;
}
声明:本站所有文章,均为公益分享性质,旨在促进技术交流学习。如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。

评论(0)