求最小数

来源:互联网 发布:ros mac禁止 编辑:程序博客网 时间:2024/06/06 12:42

求最小数(Output the minimum)


描述
每次给定3个数(均可用int表示),要求找出3个数里的最小的一个,并输出最小的数。
Input three integers and output the minimum
 

输入
a b c 三个数用空格隔开
Input three integers .
 

输出
a b c中最小的一个数
Output the minimum .
 

输入样例
5 3 98
 

输出样例
3
 

 
来源







#include<stdio.h>//主函数int main(){    int a,b,c,t;    scanf("%d %d %d",&a,&b,&c);    if(a<b)    {        t=a;    }else t=b;    if(t<c)    {        printf("%d",t);    }else printf("%d",c);    //输出回车    printf("\n");}


0 0
原创粉丝点击