真经题解 | *a>b?
2024-08-08 18:17:30
发布于:浙江
24阅读
0回复
0点赞
题目分析
这道题呢,实际上就是让我们求出a是否大于b,实际上我们只需要制作一个判断就行了。
答案
#include <iostream>
using namespace std;
int main(){
int a , b;
cin >> a >> b;
if(a > b)
cout << "YES";
else
cout << "NO";
return 0;
}
至于函数的办法有意在跟我说,现在我懒得写了
全部评论 3
想要学函数的在评论区找我哦!
2024-08-08 来自 浙江
1禁止抄袭!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
昨天 来自 上海
0我教你
#include <bits/stdc++..h> uiing namespae std; bool pal(int a,int b) { if(max(a,b)==a) return 1; else return 0; } int main() { int a,b; cin>>a>>b; if(pal(a,b)==1) cout << "YES"; else ciut << "NO"; return 0; }昨天 来自 上海
0








有帮助,赞一个