Modify the average program to promote for intergers repeatedly.stop when a nagetive number is entere
#include<stdio.h>
int main(void)
{
intcount ,sum,aninterger;
printf("enterthe interger anf terminute with negtive number\n");
count=0;
sum=0;
printf("enternumber %d:\n",count+1);
scanf("%d",&aninterger);
while(aninterger>&&aninterger!='\n')
{
sum+=aninterger;
count++;
printf("enter number%d:\n",count+1);
scanf("%d",&aninterger);
}
if(count!=0)
printf("theaverage is %f\n",sum/(double)count);
else
printf("youshuru 了一个wronginterger\n");
return0;
}
Modify the average program to promote for intergers repeatedly.stop when a nagetive number is entere的更多相关文章
- Game Engine Architecture 2
[Game Engine Architecture 2] 1.endian swap 函数 floating-point endian-swapping:将浮点指针reinterpert_cast 成 ...
- Global Average Pooling Layers for Object Localization
For image classification tasks, a common choice for convolutional neural network (CNN) architecture ...
- Application binary interface and method of interfacing binary application program to digital computer
An application binary interface includes linkage structures for interfacing a binary application pro ...
- C语言代写
MTRX1702 - C ProgrammingAssignment 2This assignment requires you to design and build a program that ...
- Monitoring and Tuning the Linux Networking Stack: Receiving Data
http://blog.packagecloud.io/eng/2016/06/22/monitoring-tuning-linux-networking-stack-receiving-data/ ...
- DTrace to Troubleshoot Java Native Memory Problems
How to Use DTrace to Troubleshoot Java Native Memory Problems on Oracle Solaris 11 Hands-On Labs of ...
- 计算机视觉code与软件
Research Code A rational methodology for lossy compression - REWIC is a software-based implementatio ...
- Code Complete阅读笔记(三)
2015-05-26 628 Code-Tuning Techniques ——Even though a particular technique generally represen ...
- 美国政府关于Google公司2013年度的财务报表红头文件
请管理员移至新闻版块,谢谢! 来源:http://www.sec.gov/ 财务报表下载↓ 此文仅作参考分析. 10-K 1 goog2013123110-k.htm FORM 10-K UNIT ...
随机推荐
- bzoj3503
显然知道第一行就可以只道整个矩阵但n<=40,搜索是不行的,我们设第一行为x1~xm可以由轻易由第一行未知数推出第n+1行,这一步我们可以压成二进制位(因为只和奇偶有关)显然n+1行必须是0,由 ...
- tyvj 1729 文艺平衡树
文艺平衡树 From admin 背景 Background 此为平衡树系列第二道:文艺平衡树 描述 Description 您需要写一种数据结构(可参考题目标题),来维护一个有序数列,其中需要提供以 ...
- HDU 1518
思路:从第一个数开始搜索,将其和与边长比对,相等则计数+1,计数达到3的时候说明可以组成,因为剩下那条必与边长相等,搜索过程注意剪枝,若某个数已被加入边长则不能重复计算,应将其标记,另外应在每一层递归 ...
- 【解决】UEFI+GPT模式下装系统(WIN7/WIN8)
最近在家想把联想超极本重装系统,可是发现想简单了,预装WIN8的本本用的是UEFI+GPT模式,以前老毛桃装系统那一套不好用了,所以百度了一些方案,还没试,先记着. 1. WIN8 先说装WIN8,貌 ...
- BCP的用法
bcp kaiser..kp_rates in c:\kp.bcp -U buykporg -P buykporg -S localhost -c bcp ccrm_oem_shqc.."s ...
- 细说Oracle数据库与操作系统存储管理二三事
在上大学的时候,学习操作系统感觉特别枯燥,都是些条条框框的知识点,感觉和实际应用的关联不大.发现越是工作以后,在工作中越想深入了解,发现操作系统知识越发重要.在实践中结合理论还是不错的一种学习方法.自 ...
- javascript数组操作汇总
javascript之数组操作 - 不悔的青春 - 博客园 1.数组的创建 var arrayObj = new Array(); //创建一个数组 var arrayObj = new Array( ...
- MongoDB 入门之查询(find)
MongoDB 入门之查询(find) 1. find 简介 (1)find的第一个参数决定了要返回哪些文档. 空的查询文档会匹配集合的全部内容.默认就是{}.结果将批量返回集合c中的所有文档. db ...
- A Tour of Go If
The if statement looks as it does in C or Java, except that the ( ) are gone and the { } are require ...
- 关于sqlite数据库
firedac数据引擎可以支持sqlite数据库,这种方式是纯绿色的,发布时不需要带上官方的sqlite.dll动态链接库文件. 当然调用该动态链接库的API方法也是可以操作sqlite数据库的,这样 ...