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
相关推荐
闲猫13 分钟前
LangChain / Core components / Models
开发语言·python·langchain
ComputerInBook1 小时前
c 和 c++ 中的宏块(macro)
c语言·c++··宏块·宏指令
AA陈超2 小时前
004 T02 - 俯视角摄像机系统 设计文档
网络·c++·ue5·虚幻引擎
-银雾鸢尾-2 小时前
C#中的索引器
开发语言·c#
bu_shuo2 小时前
c与cpp中的argc和argv
c语言·c++·算法
蓝创精英团队2 小时前
VCPKG 跨平台C++ 库管理器
c++·vcpkg
Qlittleboy2 小时前
PHP的接口参数传递的过多,max_input_vars = 5000
开发语言·php
Aurorar0rua2 小时前
CS50 x 2024 Notes Algorithms - 02
c语言·开发语言·学习方法
en.en..2 小时前
冒泡排序与选择排序完整对比解析
开发语言·数据结构·算法·c#·排序算法
兰令水2 小时前
hot100【acm版】【2026.7.18打卡-java版本】
java·开发语言·算法