ch1_3.cpp
资源名称:c.rar [点击查看]
上传用户:puke2000
上传日期:2022-07-25
资源大小:912k
文件大小:0k
源码类别:
C#编程
开发平台:
Visual C++
- //*********************
- //** ch1_3.cpp **
- //*********************
- #include <iostream.h>
- #include <math.h>
- double max(double x, double y);
- void main()
- {
- double a,b,c;
- cout <<"input two numbers:n";
- cin >>a >>b;
- c = max(a,b);
- cout <<"the squart of maximum = " <<sqrt(c);
- }
- double max(double x, double y)
- {
- if(x>y)
- return x;
- else
- return y;
- }