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
相关推荐
海上彼尚5 分钟前
Go之路 - 4.go的集合[完整版]
开发语言·后端·golang
coding随想11 分钟前
JavaScript Notifications API:告别alert弹窗,开启沉浸式用户体验革命!
开发语言·javascript·ux
阿海57411 分钟前
卸载php的shell脚本
开发语言·php
Ivy_belief15 分钟前
C++新特性汇总:涵盖C++11到C++23
java·c++·c++11·c++23
码界奇点19 分钟前
基于Python与GitHub Actions的正方教务成绩自动推送系统设计与实现
开发语言·python·车载系统·自动化·毕业设计·github·源代码管理
koddnty23 分钟前
在c++中使用HOOK修改sleep函数
linux·c++
kaikaile199531 分钟前
MATLAB计算卫星星下点轨迹
开发语言·算法·matlab
誰能久伴不乏1 小时前
深入理解 `poll` 函数:详细解析与实际应用
linux·服务器·c语言·c++·unix
二狗哈1 小时前
Cesium快速入门15:图元Primitive创建图像物体
开发语言·javascript·3d·webgl·cesium·地图可视化
lljss20201 小时前
C# 定时器类实现1s定时器更新UI
开发语言·c#