开源之路

忆往昔, 项羽不过江. 江东好风光! 今振臂一呼,率甲三千, 试问天!
posts - 86, comments - 55, trackbacks - 0, articles - 0
  C++博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

输出三个数中的最大数

Posted on 2007-03-13 14:50 江边之鸟 阅读(360) 评论(0)  编辑 收藏 引用

#include <stdio.h>
int main()
{
 printf("max number is:%d",max(1,2,6));
}

int max(int a,int b,int c)
{
 int maxNum;
 maxNum=a;
 if (b>a )
  maxNum=b;
 if (c>maxNum)
  maxNum=c;
 return maxNum;
}


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理