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 ...
随机推荐
- MFC窗口重绘
Invalidate()与 UpdateAllViews()有什么分别 Invalidate()是让程序重画窗口. UpdateAllViews()是在DOC/VIEW结构中, 当一个视图的数据改变后 ...
- Sqlite数据库的加密
最近在做一个winform的程序,考虑用Sqlite的数据库,小巧而实用,比Access强多了,不过需要加密,不过free版本没有实现加密,有一些c++的实现:比如:http://www.sqlite ...
- BZOJ2818: Gcd 欧拉函数求前缀和
给定整数N,求1<=x,y<=N且Gcd(x,y)为素数的数对(x,y)有多少对. 如果两个数的x,y最大公约数是z,那么x/z,y/z一定是互质的 然后找到所有的素数,然后用欧拉函数求一 ...
- HDU-1240 Asteroids! (BFS)这里是一个三维空间,用一个6*3二维数组储存6个不同方向
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission ...
- Oracle.ManagedDataAccessDTC.dll 使用
ODP.NET, Managed Driver Setup This section explains the setup and configuration steps required for u ...
- 用opencv画矩形打上马赛克Mosaic
/*----------------------------------------------------------------------------- * * 版权声明: * 可以 ...
- 【解决】UEFI+GPT模式下装系统(WIN7/WIN8)
最近在家想把联想超极本重装系统,可是发现想简单了,预装WIN8的本本用的是UEFI+GPT模式,以前老毛桃装系统那一套不好用了,所以百度了一些方案,还没试,先记着. 1. WIN8 先说装WIN8,貌 ...
- HW2.2
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- csipsimple 下载地址
项目下载地址: http://git.oschina.net/zencodex/CSipSimple https://github.com/zencodex/csip
- A Tour of Go Range
The range form of the for loop iterates over a slice or map. package main import "fmt" , , ...