
CG系统作业题
以c++程序编写
#include
using namespace std;
template
class Compare
{public:
Compare(numtype a,numtype b)
{x=a;
y=b;}
numtype max()
{return (x>y)?x:y;}
numtype min()
{return (x
numtype x,y;
};
int main(){
int i,j;
double q,w;
char s,d;
cout<<"Please enter two integers:"< cout<<"Please enter two floating point numbers:"< cout<<"Please enter two characters:"< 欢迎分享,转载请注明来源:内存溢出
Compare
cout<<"the max is : "<
Compare
cout<<"the max is : "<
Compare
cout<<"the max is : "<
return 0;
}
微信扫一扫
支付宝扫一扫
评论列表(0条)