大二上学期C++作业讲述.docxVIP

  • 0
  • 0
  • 约1.45万字
  • 约 24页
  • 2017-09-01 发布于湖北
  • 举报
一1.cpp#include iostream#include cstdlibusing namespace std;int main(){ intprice,s,n(1);srand(time(NULL)); //获得随机数price=(rand())%1001; while(n) //n用来判断是否找到正确的价格 {coutinput the number you guess:;cins;if(sprice)coutthe number you guess is lower.\n;else if(sprice)coutthe number you guess is higher.\n;else n=0;}coutyou got the right answer.;system (pause);return 0;}一2.cpp#include iostream#include cmathusing namespace std;class Point //Point类的创建{ public:Point(int xx=0,int yy=0) {X=xx;

文档评论(0)

1亿VIP精品文档

相关文档