#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. win2003+IIS6+PHP5.3.8+MSSQL2008的安装配置

  2. java数据类型图:

    java数据类型图:                                 ┏数值型━┳━整数型:byte short int long               ┏基本数据类型━━┫   ...

  3. 利用if else判断是否及格

    static void Main(string[] args)        {            while (true)            {                string ...

  4. C# 线程更新UI

    最方便的用法: private void ViewMsg(string msg)        { /* control.Invoke(new SetControlTextDelegate((ct,  ...

  5. [Irving]Android 常用布局之RelativeLayout

    RelativeLayout相对布局 相对布局 RelativeLayout 允许子元素指定它们相对于其父元素或兄弟元素的位置,这是实际布局中最常用的布局方式之一. 它灵活性大很多,当然属性也多,操作 ...

  6. Storm系列(二)系统结构及重要概念

    在Storm的集群里面有两种节点:控制节点和工作节点,控制节点上面运行Nimbus进程,Nimbus负责在集群里面分配计算任务,并且监控状态.每一个工作节点上面运行Supervisor进程,Super ...

  7. HW5.23

    public class Solution { public static void main(String[] args) { int count = 0; for(int i = 0; i < ...

  8. Java 下 SSL 通信原理及实例

    有关SSL的原理和介绍在网上已经有不少,对于Java下使用keytool生成证书,配置SSL通信的教程也非常多.但如果我们不能够亲自动手做一个SSL Sever和SSL Client,可能就永远也不能 ...

  9. Topology拓扑

  10. ABAP SY标签一览 .

    Description: SY-SUBRC:语句执行后的返回值,0表示成功SY-DATUM:当前服务器日期SY-UZEIT:当前服务器时间SY-ULINE:255长度的水平线SY-VLINE:垂直线S ...