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
相关推荐
shark22222226 分钟前
Python 爬虫实战案例 - 获取社交平台事件热度并进行影响分析
开发语言·爬虫·python
小肝一下8 分钟前
每日两道力扣,day2
c++·算法·leetcode·职场和发展
551只玄猫17 分钟前
【数学建模 matlab 实验报告6】行遍性问题
开发语言·数学建模·matlab
乱蜂朝王1 小时前
使用 C# 和 ONNX Runtime 部署 PaDiM 异常检测模型
开发语言·c#
波诺波1 小时前
p1项目system_model.py代码
开发语言·python
危笑ioi1 小时前
helm部署skywalking链路追踪 java
java·开发语言·skywalking
静心观复1 小时前
Python 虚拟环境与 pipx 详解
开发语言·python
卷心菜狗1 小时前
Re.从零开始使用Python构建本地大模型网页智慧聊天机器人
开发语言·python·机器人
书到用时方恨少!2 小时前
Python NumPy 使用指南:科学计算的基石
开发语言·python·numpy
2501_933329552 小时前
技术深度拆解:Infoseek舆情系统的全链路架构与核心实现
开发语言·人工智能·分布式·架构