page111
2012-05-30 22:14
106 查看
// 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?
//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?
相关文章推荐
- Page 111 附加事件
- 深入浅出C# 中文版 图文皆译 第三章 page111
- 2012-10-24 11gR2 "ADMINISTRATOR'S GUIDE" page 111 - 218
- javascript refresh page 几种页面刷新的方法
- Replace the SSL Certificate for HP System Management homepage with a CA generated one
- PageHelper中默认PageInfo成员变量
- 如何修改PreferencePage中控件的默认布局
- 将大型 Page Blob 的页范围进行分段
- <%@ page trimDirectiveWhitespaces="true" %>
- VMProcessPageFault Error: Page fault occurred while in power handler! Address = 0x40314228解決方法
- JSP页面中的pageEncoding和contentType两种属性
- ViewPage+Fragment+ListView+ImageLoade的无限轮播
- innodb的dirty page满了的写盘机制
- Starling Feathers Controls PageIndicator
- 张高兴的 Xamarin.Forms 开发笔记:为 Android 与 iOS 引入 UWP 风格的汉堡菜单 ( MasterDetailPage )
- pageEncoding和charset=UTF-8
- 关于Page Fault的一些整理
- 在jQuery和Ajax中无法使用${pageContext.request.contextPath}
- asp.net page常用类介绍
- 构建基于WinRT的WP8.1 App 03:Page控件