page111
来源:互联网 发布:linux tar 到目录 编辑:程序博客网 时间:2024/05/07 10:15
// page111.cpp : 定义控制台应用程序的入口点。
//C++ 面向对象程序设计
//累加10个负数
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
int number ,sum = 0 , count = 0 ;
cout << " Enter 10 negative numbers:\n";
while( ++count <= 10)
{
cin >> number;
if(number >= 0)
{
cout << " ERROR: positive number "
<< " or zero was entered as the \n"
<< count << " the number !Input ends\n"
<< " with the "<< count << "the number .\n"
<< count << "the number was not added in .\n";
break ;
}
sum = sum + number;
}
cout << sum << " is the sum of the frist "
<< (count - 1)<< " numbers.\n";
cin >> number;
return 0;
}
--------------现在不知道怎么上传不了我的切图啦 ------------------------
难道是bug?
- page111
- 深入浅出C# 中文版 图文皆译 第三章 page111
- 每天学点linux命令(4)
- 关于c语言创建dll文件及dll文件的调用和一点设想
- A step-by-step guide for debugging native code (Sequoyah/ndk guide)
- 在Android应用中使用Pull解析XML文件(传智播客视频笔记)
- MySQL索引分析和优化
- page111
- 所有用PyYaml来dump到文件的一定要看!!!
- c++ MFC file operation
- windows下修改nginx pathinfo支持、thinkphp在nginx环境下隐藏index.php
- 十五周任务一
- 别人是你自己的发现者
- Oracle利用DBMS_METADATA.GET_DDL获取对象DDL语句
- 利用PreparedStatement 结果注入问题
- 初步学习Camera与Matrix