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
相关推荐
疯狂的代M夫19 分钟前
C++对象的内存布局
开发语言·c++
mit6.8241 小时前
Linux下C#项目构建
开发语言·c#
群联云防护小杜1 小时前
从一次 DDoS 的“死亡回放”看现代攻击链的进化
开发语言·python·linq
霸敛1 小时前
好家园房产中介网后台管理完整(python+flask+mysql)
开发语言·python·flask
重启的码农1 小时前
llama.cpp 分布式推理介绍(4) RPC 服务器 (rpc_server)
c++·人工智能·神经网络
Momentary_SixthSense1 小时前
RESP协议
java·开发语言·javascript·redis·后端·python·mysql
重启的码农1 小时前
llama.cpp 分布式推理介绍(3) 远程过程调用后端 (RPC Backend)
c++·人工智能·神经网络
敲上瘾1 小时前
Linux I/O 多路复用实战:Select/Poll 编程指南
linux·服务器·c语言·c++·select·tcp·poll
huangyuchi.2 小时前
【Linux系统】匿名管道以及进程池的简单实现
linux·运维·服务器·c++·管道·匿名管道·进程池简单实现
only-lucky2 小时前
C++中的 Eigen库使用
开发语言·c++