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
相关推荐
小小编程路几秒前
C++ 多线程与并发
java·jvm·c++
审判长烧鸡3 分钟前
【Go工具】go-playground是什么组织?官方的?
开发语言·安全·go
kkeeper~28 分钟前
0基础C语言积跬步之字符函数与字符串函数(上)
c语言·开发语言
hhb_6181 小时前
Swift核心技术难点与实战案例解析
开发语言·ios·swift
一楼的猫1 小时前
从工具链视角对比:番茄作家助手 vs 第三方写作辅助方案
java·服务器·开发语言·前端·学习·chatgpt·ai写作
程序leo源1 小时前
Qt窗口详解
开发语言·数据库·c++·qt·青少年编程·c#
likerhood2 小时前
Java static 关键字从浅入深
java·开发语言
zh_xuan2 小时前
解决VS Code 控制台中文乱码
c++·vscode·乱码
郭涤生2 小时前
飞凌 RK3588 开发板同显 / 异显模式切换
c++·rk3588
猫猫的小茶馆2 小时前
【Python】函数与模块化编程
linux·开发语言·arm开发·驱动开发·python·stm32