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
相关推荐
2401_857683542 分钟前
C++代码静态检测
开发语言·c++·算法
2401_838472517 分钟前
内存泄漏自动检测系统
开发语言·c++·算法
GHL28427109010 分钟前
Docker Desktop 启动报错“Virtualization support not detected“
c++·docker·容器
开发者小天12 分钟前
python中的class类
开发语言·python
2501_9333295525 分钟前
Infoseek数字公关AI中台技术解析:如何构建企业级舆情监测与智能处置系统
开发语言·人工智能
m0_7066532325 分钟前
基于C++的爬虫框架
开发语言·c++·算法
梵刹古音26 分钟前
【C语言】 数据类型的分类
c语言·开发语言
diediedei32 分钟前
嵌入式数据库C++集成
开发语言·c++·算法
君义_noip34 分钟前
洛谷 P3388 【模板】割点(割顶)
c++·算法·图论·信息学奥赛·csp-s
xie0510_35 分钟前
string模拟实现
开发语言·c++·算法