#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的更多相关文章

  1. Game Engine Architecture 2

    [Game Engine Architecture 2] 1.endian swap 函数 floating-point endian-swapping:将浮点指针reinterpert_cast 成 ...

  2. Global Average Pooling Layers for Object Localization

    For image classification tasks, a common choice for convolutional neural network (CNN) architecture ...

  3. 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 ...

  4. C语言代写

    MTRX1702 - C ProgrammingAssignment 2This assignment requires you to design and build a program that ...

  5. Monitoring and Tuning the Linux Networking Stack: Receiving Data

    http://blog.packagecloud.io/eng/2016/06/22/monitoring-tuning-linux-networking-stack-receiving-data/ ...

  6. 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 ...

  7. 计算机视觉code与软件

    Research Code A rational methodology for lossy compression - REWIC is a software-based implementatio ...

  8. Code Complete阅读笔记(三)

    2015-05-26   628   Code-Tuning Techniques    ——Even though a particular technique generally represen ...

  9. 美国政府关于Google公司2013年度的财务报表红头文件

    请管理员移至新闻版块,谢谢! 来源:http://www.sec.gov/ 财务报表下载↓ 此文仅作参考分析. 10-K 1 goog2013123110-k.htm FORM 10-K   UNIT ...

随机推荐

  1. eclipse 代码中突然出现特殊字符

    在写代码的时候,不知道点到了 eclipse 的哪个属性,代码中就出现了一些特殊字符,也不能删除. 请问,在 eclipse 中该怎么设置,才能将这些字符去掉. 如下图所示: 解决方法: 选择Wind ...

  2. 六月计划#2B(6.10-6.16)

    4/7 STL set 数学 快速傅立叶(FFT) 高斯消元 动态规划 斜率优化

  3. NOI2014 起床困难综合症

    3668: [Noi2014]起床困难综合症 Time Limit: 10 Sec  Memory Limit: 512 MBSubmit: 225  Solved: 153[Submit][Stat ...

  4. 基于DDD的现代ASP.NET开发框架--ABP系列之3、ABP分层架构

    基于DDD的现代ASP.NET开发框架--ABP系列之3.ABP分层架构 ABP是“ASP.NET Boilerplate Project (ASP.NET样板项目)”的简称. ABP的官方网站:ht ...

  5. (转载)PHP 下 CURL 通过 POST 提交表单失败的原因之一与解决办法

    (转载)http://blog.renren.com/share/246611432/7511385884 前几天在学习使用 CURL 时遇到一个问题:在 a.php 中以 POST 方式向 b.ph ...

  6. curl与wget区别

    1.curl是libcurl这个库支持的,wget是一个纯粹的命令行命令.2.curl支持更多的协议.curl supports FTP, FTPS, HTTP, HTTPS, SCP, SFTP, ...

  7. HDU-1238 Substrings

    Substrings Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total ...

  8. [liu yanling]软件测试用例的基本要素包括哪些?

    用例编号: 测试用例的编号有一定的规则,比如系统测试用例的编号这样定义规则: PROJECT1-ST-001 ,命名规则是项目名称+测试阶段类型(系统测试阶段)+编号.定义测试用例编号,便于查找测试用 ...

  9. 2013 ACM区域赛长沙 I LIKE vs CANDLE(ZOJ3734) 很好的一道树形DP

    题意:一棵有根树,每个节点都有一个value值和属性(zan或是 CANDLE).你可以通过反转一些点的属性,反转一个点时候,它的整个子树都会被反转属性.有些点反转消耗代价为X,有些为Y.你的目标的是 ...

  10. CosCos2D-android 代码总结

    CosCos2D-android 学习总结 资料: Android游戏开发视频教程 Cocos-android-1代码包下载 直接上代码: MainActivity中Cocos常规写法: //coco ...