欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

sdut-1158 C语言实验——两个数最大

发布时间:2025/4/16 编程问答 29 豆豆
生活随笔 收集整理的这篇文章主要介绍了 sdut-1158 C语言实验——两个数最大 小编觉得挺不错的,现在分享给大家,帮大家做个参考.
点击打开链接 Time Limit: 1000MS Memory Limit: 65536KB Submit Statistic Discuss

Problem Description

求两个整数中的最大值。

Input

两个数。#include <iostream> using namespace std; int main() {int a,b;cin>>a>>b;if(a>=b)cout<<"max="<<a<<endl;elsecout<<"max="<<b<<endl;return 0; }/*************************************************** User name: YT1658506207邵雪源 Result: Accepted Take time: 0ms Take Memory: 204KB Submit time: 2017-07-26 15:04:46 ****************************************************/

Output

输出最大的值,格式为: max=最大值。

Example Input

1 2

Example Output

max=2

总结

以上是生活随笔为你收集整理的sdut-1158 C语言实验——两个数最大的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。