C++ Primer plus--0a5 自定义带返回值的函数

cpp 复制代码
#pragma region convert.cpp
//convert.cpp -- converts stone to pounds
#if 0
#include <iostream>
 
int stonetolb(int);	//function prototype 
int main(void)
{
	using namespace std;

	int stone;
	cout << "Enter the weight in stone: ";
	cin >> stone;

	int pounds = stonetolb(stone);
	cout << stone << " stone = ";
	cout << pounds << " pounds," << endl;
	return 0;
}

int stonetolb(int sts)
{

	return 14 * sts;
}
#endif
#pragma endregion
相关推荐
ytttr8737 小时前
OPC UA 协议栈 C 语言实现
c语言·开发语言·mfc
song5017 小时前
Ascend C 算子开发:从入门到上手
c语言·开发语言·图像处理·人工智能·分布式·flutter·交互
小a杰.7 小时前
Ascend C编程语言进阶:高性能算子开发技巧
android·c语言·开发语言
全糖可乐气泡水7 小时前
Codex适配国产信创环境安装部署与技术适配全解析
开发语言·git·python·算法·百度
雨落在了我的手上7 小时前
初始java(十):类和对象(⼆)
java·开发语言
LeocenaY7 小时前
搜集的一些测开面试题
开发语言·python
h_a_o777oah7 小时前
状态机+划分型 DP :深度解析K-划分问题下 DP 状态的转移逻辑(洛谷P2679 P2331 附C++代码)
c++·算法·动态规划·acm·状态机dp·划分型dp·滚动数组优化
threelab7 小时前
Three.js 加载 3D Tiles 瓦片数据 | 三维可视化 / AI 提示词
开发语言·前端·javascript·人工智能·3d·着色器
_洋8 小时前
Three.js加载 .obj文件 和 .gltf文件
开发语言·javascript·ecmascript
wjs20248 小时前
Font Awesome 性别图标
开发语言