运行 ❯
创建
您自己的
网站
×
更改方向
更改主题,深色/浅色
转至 Spaces
#include <iostream> using namespace std; int plusFunc(int x, int y) { return x + y; } double plusFunc(double x, double y) { return x + y; } int main() { int myNum1 = plusFunc(8, 5); double myNum2 = plusFunc(4.3, 6.26); cout << "Int: " << myNum1 << "\n"; cout << "Double: " << myNum2; return 0; }
Int: 13
Double: 10.56