
C++
sinat_21427221
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
C++ primer plus第6版第三章作业
2.编写一个小程序,要求以几英尺几英寸的方式输入身高,并以磅为单位输入体重。(使用3个变量来储存这些信息。)该程序报告其BMI(Body Mass Index,体重指数)。为了计算BMI,该程序以英寸的方式指出用户的身高(1英尺为12英寸),并将以隐村为单位的身高转换为以米为单位的身高(1英寸=0.0254米)。然后,将以磅为单位的体重转换为以千克为单位的体重(1千克=2.2磅)。最后,计算相应的原创 2017-04-18 21:07:24 · 592 阅读 · 0 评论 -
C++ primer plus第6版第四章作业
1.#include int main() { using namespace std; const int size= 20; char first_name[size]; cout<<"What is your first name? "; cin.getline(first_name,size); char last原创 2017-04-20 20:26:54 · 258 阅读 · 0 评论 -
猜数字
#include #include "time.h" #include "stdlib.h" int main() { using namespace std; int x,y; srand((unsigned)time(NULL)); y=1+rand()%99; cout<<"Enter a number between 0 to 100."<<e原创 2017-04-21 17:57:33 · 213 阅读 · 0 评论