#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. Luogu_1565_牛宫_(最大子矩阵)

    描述 http://www.luogu.org/problem/show?pid=1565 给出一个n*m的矩阵,求最大的且和值为正的子矩阵. 分析 很容易想到的是用前缀和维护,暴力枚举左上角和右下角 ...

  2. Web服务器排行:Nginx超越Apache 成为全球

    Apache(34.5%)第一名的位置.不过,纵观全球,Apache仍然是最受欢迎的Web服务器,有65.3%的网站使用. 在排名前100万的网站中,主流服务器仍为Apache,占据了60.6%的份额 ...

  3. 清理Xcode中无用的 Provisioning Profile.

    Xcode中如果添加过多个开发者账号, 慢慢就会发现 Provisioning Profile 有很多, 无用的 Provisioning Profile Xcode也不会自动删除, 想要清理的话, ...

  4. “System.Exception”类型的异常在 NHibernate.dll 中发生,但未在用户代码中进行处理

    “System.Exception”类型的异常在 NHibernate.dll 中发生,但未在用户代码中进行处理 其他信息: OCIEnvCreate 失败,返回代码为 -,但错误消息文本不可用. 如 ...

  5. [Tommas] UNION 和 UNION ALL 的区别

    UNION指令的目的是将两个 SQL 语句的结果合并起来.从这个角度来看,UNION跟 JOIN 有些许类似,因为这两个指令都可以由多个表格中撷取资料.UNION的一个限制是两个 SQL 语句所产生的 ...

  6. json包的loads dumps区分

    符合json格式的字符串    --(json.laods)-->     json(字典形式或是列表形式)    --(json.dumps)-->    符合json格式的字符串

  7. MFC之RTTI与动态创建

    本人能力.精力有限,所言所感都基于自身的实践和有限的阅读.查阅,如有错误,欢迎拍砖,敬请赐教——博客园:钱智慧. 在说RTTI之前需要明白c++中类静态成员的初始化特点:类的静态数据成员需要在类体外显 ...

  8. plsql的参数IN和OUT

    代码片段一 create or replace procedure scott.pro_para_inout(p_dname in out scott.dept.dname%TYPE, p_loc o ...

  9. CF402E Strictly Positive Matrix 传递闭包用强连通分量判断

    题目链接:http://codeforces.com/problemset/problem/402/E /**算法分析: 这道题考察了图论基本知识,就是传递闭包,可以构图用强联通分量来判断 */ #i ...

  10. PC-启动慢的解决好方法!

    你试试这样看行不行:­ 首先,打开“系统属性”(在我的电脑上点右键-属性,或者在控制面板里打开“系统”,快捷键win+pause break)点“高级”选项卡,在“启动和故障恢复”区里打开“设置”,去 ...