fig03_25.cpp

来自「经典vc教程的例子程序」· C++ 代码 · 共 18 行

CPP
18
字号
// Fig. 3.25: fig03_25.cpp
// Using overloaded functions
#include <iostream.h>

int square( int x ) { return x * x; }

double square( double y ) { return y * y; }

int main()
{
   cout << "The square of integer 7 is " << square( 7 )
        << "\nThe square of double 7.5 is " << square( 7.5 ) 
        << endl;    

   return 0;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?