首页 > 编程语言 > 详细

C++ Primer Plus第六版编程练习---第3章 处理数据(未完待续)

时间:2018-04-27 02:02:46      阅读:204      评论:0      收藏:0      [点我收藏+]

1.

#include <iostream>

const int CONVER_FACTOR = 12;

int main(int argc, char* argv[])
{
int height = 0;
std::cout << "Pleas enter your height with inch_ ";
std::cin >> height;
if(0 > height)
{
std::cout << "Pleas enter your height with inch_ ";
std::cin >> height;
}
std::cout << "You are " << height/CONVER_FACTOR << " foots and " << height%CONVER_FACTOR << " inches." << std::endl;
return 0;

}

 

C++ Primer Plus第六版编程练习---第3章 处理数据(未完待续)

原文:https://www.cnblogs.com/f00345709/p/8955760.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!