⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 3_16.cpp

📁 10个比较经典的C++程序。初学者就先多学习学习别人吧。
💻 CPP
字号:
#include <iostream>
using namespace std;
int CalVol(int length, int width = 2, int height = 3);	// 带有默认形参值的函数声明
void main()
{	int x = 10, y = 11, z = 12;
	cout << "Volume of the box is: " ;	cout << CalVol(x, y, z) << endl;
	cout << "Volume of the box is: " ;	cout << CalVol(x, y) << endl;
	cout << "Volume of the box is: " ;	cout << CalVol(x) << endl;
	cout << "Volume of the box is: ";	cout << CalVol(x, 100) << endl;
	cout << "Volume of the box is: ";	cout << CalVol(100, 100, 100) << endl;
}
int CalVol(int length, int width, int height){return length * width * height;}

⌨️ 快捷键说明

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