第一章 课后习题 7

Posted on 2017-09-10 14:37  dragonliu欧美  阅读(118)  评论(1编辑  收藏  举报
 1 #include<iostream>
 2 using namespace std;
 3 int main()
 4 {
 5   int a,b,c;
 6   int f(int x,int y,int z);
 7   cin>>a>>b>>c;
 8   c=f(a,b,c);
 9   cout<<c<<endl;
10   return 0;
11 }
12 int f(int x,int y,int z)
13 {
14   int m;
15   if(x<y) m=x;
16    else m=y;
17   if (z<m) m=z;
18   return(m);
19 }