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 ...
随机推荐
- jQuery name属性与checked属性结合获取表单元素值
var paytype = $("input[name='paytype']:checked").val(); alert(paytype); input元素下名称为paytype ...
- Master Nginx(5) - Reverse Proxy Advanced Topics
Security through separtion Encrypting traffic with SSL Authenticating clients using SSL Blocking tra ...
- iOS 开发者计划申请 2014 年最新心得[转]
iOS 开发者计划申请 2014 年最新心得 http://myfairland.net/ios-developer-program/
- 不要直接对Request.Headers["If-Modified-Since"]使用Convert.ToDateTime
不要直接对Request.Headers["If-Modified-Since"]使用Convert.ToDateTime 前一段时间图片处理服务一直报“System.Format ...
- 安装Intel CPU的Android模拟器
1. 用Android SDK Manager安装Extras/Intel x86 Emulator Accelarator(HAXM) 2. 用Android SDK Manager安装Androi ...
- udhcpc和udhcpd移植
实现DHCP自动获取IP地址 前提:系统已经实现DNS(即使用ping www.baidu.com测试时能ping通). 1. 在内核中添加以下选项: Networking ---> [*] ...
- 谈谈分布式事务之一:SOA需要怎样的事务控制方式
在一个基于SOA架构的分布式系统体系中,服务(Service)成为了基本的功能提供单元,无论与业务流程无关的基础功能,还是具体的业务逻辑, 均实现在相应的服务之中.服务对外提供统一的接口,服务之间采用 ...
- json包的loads dumps区分
符合json格式的字符串 --(json.laods)--> json(字典形式或是列表形式) --(json.dumps)--> 符合json格式的字符串
- nyoj开心的小明
这个问题是01背包,而对于编程之美那道是完全背包问题,在编程之美中也有一个0,1背包问题. 而且是容量是小于等于,不是等于,对于是否等于,在初始化参数时候不一样,不小于全部初始化为0,恰好等于,初始化 ...
- Windows Azure 的磁盘管理相关概念
在 Windows Azure 的虚拟机中,磁盘有多种使用方式.操作系统磁盘是用来为虚拟机提供操作系统的虚拟硬盘.数据磁盘是附加到虚拟机上用来存储应用程序数据的 VHD. 根据应用程序的需要,可从多种 ...