#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. Android开发之获取设备的屏幕信息和px dp之间的转换

    DisplayMetrics metric = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(metr ...

  2. bzoj列表3

    水题列表 bzoj2429 裸的最小生成树 bzoj1567 二分答案+hash判断,判断序列.矩阵是否相同常用hash bzoj1087 简单的状压dp bzoj1754 高精度乘法,模拟竖式即可

  3. HDU-1240 Asteroids! (BFS)这里是一个三维空间,用一个6*3二维数组储存6个不同方向

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

  4. HDOJ-ACM1017(JAVA)

    问题描述: 简单来说,就是 输入N,然后输入N个数据块,一个数据块包含(n,m),并计算0 < a < b < n 且 (a^2+b^2 +m)/(ab) 为整数.其中a,b只要符合 ...

  5. Android: Dragging Popup Window 可移动浮动View

    final View cv = new View(this); setContentView(cv); TextView tv = new TextView(this); tv.setBackgrou ...

  6. storm核心组件

    Storm核心组件 了解 Storm 的核心组件对于理解 Storm 原理非常重要,下面介绍 Storm 的整体,然后介绍 Storm 的核心. Storm 集群由一个主节点和多个工作节点组成.主节点 ...

  7. A Tour of Go Struct Fields

    Struct fields are accessed using a dot. package main import "fmt" type Vertex struct { X i ...

  8. nyoj 27 水池数目

    水池数目 时间限制:3000 ms  |  内存限制:65535 KB 难度:4   描述 南阳理工学院校园里有一些小河和一些湖泊,现在,我们把它们通一看成水池,假设有一张我们学校的某处的地图,这个地 ...

  9. 如何让2个并列的div根据内容自动保持同等高度

    最近在工作中碰到一个需求: 有左右2个并列的div,2个div都不能限定高度.左div为导航,右div为内容.如何能让左div块自动获得和右div块相等的高度? 同时,也有网友提问到"如果右 ...

  10. java request判断微信客户端访问

    微信客户端访问时候user-agent信息如下: Mozilla/5.0 (Linux; Android 5.0.1; M040 Build/LRX22C) AppleWebKit/537.36 (K ...