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
相关推荐
fengkai45457 分钟前
Python对接LangChain智能体开发(Tool工具调用与 Agent智能体)
运维·开发语言·python·langchain·llm·ai agent·tool
纪念 22936 分钟前
C++ 算法模板与错题 模拟(一)
android·c++·算法
随流寻影39 分钟前
利用 C++ 实现二叉搜索树的增删查
开发语言·c++
总要学点什么1 小时前
第128篇:镜头光晕与高光——把逆光太阳晕成会躲山的光斑
开发语言·javascript·数码相机·microsoft·材质·cesium
Escalating_xu2 小时前
【COZE实战】插件与知识库(三):让智能体会查资料,也会使用工具
开发语言·网络·人工智能·ai
学逆向的2 小时前
C++多态 汇编分析
开发语言·汇编·c++·网络安全
阿凤212 小时前
学习java---流程控制篇
java·开发语言·学习
ShineWinsu2 小时前
对于Qt:QSound的解析
c++·qt·面试·音频·笔试·客户端·qsound
derek19972 小时前
软考软件设计师:白盒覆盖哪条最弱、McCabe 复杂度怎么数、单元测试最能发现什么错
c语言·c++·计算机网络·软件工程·学习方法
Code_Solitude2 小时前
c语言:期末最后一道大题模拟
c语言·开发语言