HDU1092:A+B for Input-Output Practice (IV)

标签: HDU ACM
42人阅读 评论(1) 收藏 举报
分类:


/*
每行第一个数为需要相加的数据个数,第一个数为0则退出输入
*/

#include <stdio.h>

int main()
{
	int N;
	int i, a;
	int sum;

	//freopen("F:\\input.txt", "r", stdin);
	while ((scanf("%d", &N) != EOF) && N)
	{
		sum = 0;
		for (i = 0; i < N; i++)
		{
			scanf("%d", &a);
			sum += a;
		}
		printf("%d\n", sum);
	}
	//freopen("con", "r", stdin);
	//system("pause");
	return 0;
}

查看评论

汇编语言程序设计IV

-
  • 1970年01月01日 08:00

HDOJ 1092 A+B for Input-Output Practice (IV)

Problem Description Your task is to Calculate the sum of some integers.Input Input contains multip...
  • qq_26525215
  • qq_26525215
  • 2015-10-22 16:02:56
  • 569

[1092]:A+B for Input-Output Practice (IV)

A+B for Input-Output Practice (IV) Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32...
  • yang_chengfeng
  • yang_chengfeng
  • 2015-11-15 13:55:08
  • 173

hduoj1092(A+B for Input-Output Practice (IV))

#include int main() {     int n,m,sum,i;     while(scanf("%d",&n),n)     {           sum=0; ...
  • bestxyj
  • bestxyj
  • 2014-07-22 20:51:16
  • 218

[水题][hdoj_1092]A+B for Input-Output Practice (IV)

// hdoj_1092 A+B for Input-Output Practice (IV) #include int main(void) { int a, n, i, sum; wh...
  • litiouslove
  • litiouslove
  • 2012-07-31 01:06:45
  • 2086

「HD_ACM」A+B for Input-Output Practice (IV)

Problem Description Your task is to Calculate the sum of some integers. ->你的任务是计算一些整数相加   ...
  • Simple_Bottle
  • Simple_Bottle
  • 2015-05-02 21:26:59
  • 965

hdu1092 - A+B for Input-Output Practice (IV)

http://acm.hdu.edu.cn/showproblem.php?pid=1092 输入输出练习
  • moonspiritacm
  • moonspiritacm
  • 2016-12-31 18:54:49
  • 150

A+B for Input-Output Practice (IV) (sdut oj)

A+B for Input-Output Practice (IV) Time Limit: 1000MS Memory Limit: 65536KB ...
  • SwordsMan98
  • SwordsMan98
  • 2017-01-25 17:24:33
  • 87

SDUT 1013 A+B for Input-Output Practice (IV)

Problem Description Your task is to Calculate the sum of some integers. Input Input contains multip...
  • ccblogger
  • ccblogger
  • 2017-06-26 23:51:23
  • 147

1096:A+B for Input-Output Practice (VIII)

这个是格式控制问题。
  • BeiZhang1991
  • BeiZhang1991
  • 2014-04-11 17:42:02
  • 2337
    个人资料
    等级:
    访问量: 1万+
    积分: 374
    排名: 20万+
    文章存档
    最新评论