📄 pex7_1.cpp
字号:
#include <iostream.h>
#pragma hdrstop
#include "wex7_1.h"
void main (void)
{
// test Max with int, float and string data
int m = 10, n = 20;
float x = -4.5, y = 2.6;
char *str1 = "smaller", *str2 = "larger";
cout << "Max of 10 and 20 is " << Max(m,n) << endl;
cout << "Max of -4.5 and 2.6 is " << Max(x,y) << endl;
cout << "Max of 'smaller' and 'larger' is '"
<< Max(str1,str2) << '\'' << endl;
}
/*
<Run>
Max of 10 and 20 is 20
Max of -4.5 and 2.6 is 2.6
Max of 'smaller' and 'larger' is 'smaller'
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -