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
相关推荐
ShineWinsu5 小时前
对于Redis:List类型的解析
数据库·c++·redis·链表·缓存·面试·list
阿钱真强道6 小时前
25 嵌入式操作系统 | 设备面板:用 Qt 控件把“设备“画出来(本节不接串口)
开发语言·qt·flask·架构设计·协议契约
ym hyd 1116 小时前
宝宝早教服务系统源码 Java+SpringBoot+Vue3 前后分离
java·开发语言·spring boot
看浪的路人6 小时前
第7讲:实时告警与自动化响应
开发语言·后端·golang
“AI国潮设计-小江”6 小时前
Python实战 | SDXL批量生成“潮汕英歌舞”国潮甜品IP,附核心Prompt与商用授权思路
开发语言·人工智能·python·prompt·aigc
H.莓飛6 小时前
【数据结构】栈
linux·开发语言·数据结构·算法·centos
无糖可乐没有灵魂6 小时前
用一篇文章来精通“进程/线程/协程/锁“多并发任务
开发语言·php
2601_962885726 小时前
如何用 Python 分析股票的日历效应?(星期效应与月份效应,附数据挖掘陷阱)
开发语言·python·数据挖掘
小师兄吃牛肉7 小时前
C++ 与 Lua 的协程交互:从原理到实战
c++·lua·交互