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
相关推荐
Ulyanov2 分钟前
高保真单脉冲雷达导引头回波生成:Python建模与实践
开发语言·python·仿真·系统设计·单脉冲雷达
Mr_WangAndy37 分钟前
C++数据结构与算法_线性表_数组_概念动态数组,刷题
c++·二分查找·数组刷题·数组字符串逆序·零移动·有序数组的平方
阿猿收手吧!40 分钟前
【C++】jthread:优雅终止线程新方案
开发语言·c++
lly2024061 小时前
《JavaScript 实例》
开发语言
十五年专注C++开发1 小时前
C++中各平台表示Debug的宏
开发语言·c++·debug
张小凡vip1 小时前
Python异步编程实战:基于async/await的高并发实现
开发语言·python
玩c#的小杜同学2 小时前
源代码保卫战:给C# 程序(混淆、加壳与反逆向实战)
开发语言·笔记·c#
阿猿收手吧!3 小时前
【C++】Ranges:彻底改变STL编程方式
开发语言·c++
云游云记3 小时前
php 随机红包数生成
开发语言·php·随机红包
程序员林北北3 小时前
【前端进阶之旅】JavaScript 一些常用的简写技巧
开发语言·前端·javascript