#include <iostream.h> int max(int a, int b); double max(double x, double y); void main() { int a=10, b=20 ,c; double x=200.3, y=400.6,z; c=max(a,b); z=max(x,y); cout<<c<<" "<<z<<endl;}int max(int a,int b){ if(a>b) c=a; else c=b; cout<<"int function"<<endl; return c; }double max(double x,double y) { if(x>y) z=x; else z=y; cout<<"float function"<<endl; return z; }
- 2 回答
- 0 关注
- 1279 浏览
添加回答
举报
0/150
提交
取消