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
相关推荐
郑州光合科技余经理9 小时前
代码展示:PHP搭建海外版外卖系统源码解析
java·开发语言·前端·后端·系统架构·uni-app·php
feifeigo1239 小时前
matlab画图工具
开发语言·matlab
dustcell.9 小时前
haproxy七层代理
java·开发语言·前端
norlan_jame9 小时前
C-PHY与D-PHY差异
c语言·开发语言
哇哈哈202110 小时前
信号量和信号
linux·c++
多恩Stone10 小时前
【C++入门扫盲1】C++ 与 Python:类型、编译器/解释器与 CPU 的关系
开发语言·c++·人工智能·python·算法·3d·aigc
QQ40220549610 小时前
Python+django+vue3预制菜半成品配菜平台
开发语言·python·django
遥遥江上月10 小时前
Node.js + Stagehand + Python 部署
开发语言·python·node.js
蜡笔小马10 小时前
21.Boost.Geometry disjoint、distance、envelope、equals、expand和for_each算法接口详解
c++·算法·boost
m0_5312371710 小时前
C语言-数组练习进阶
c语言·开发语言·算法