C语言实验——求两个整数之中较大者

来源:互联网 发布:网络代理兼职加盟 编辑:程序博客网 时间:2024/06/11 12:28

C语言实验——求两个整数之中较大者

Time Limit: 1000MS Memory Limit: 65536KB
Submit Statistic

Problem Description

输入两个整数,请编程求其中的较大者。

Input

在一行中输入用空格隔开的两个整数,例如5 9。

Output

输出两个整数之中较大者,输出形式举例:max=9。

Example Input

5 9

Example Output

max=9
#include<stdio.h>int main(){    int a,b,c;    scanf("%d%d",&a,&b);    if(a>b)    {        c=a;    }    else    {        c=b;    }    printf("max=%d\n",c);    return 0;}


原创粉丝点击