题目描述
#include <stdio.h>
/******************************************/
/// Write your code here,
/// beginning with “#define”…
/******************************************/
int main()
{
int x, s, n, i;
scanf("%d", c n);
if(s = i = 0; i < n; i++)
{
scanf("%d", c x);
s += x;
}
printf("%d\n", s);
return 0;
}
输入
输出
样例输入 Copy
5
1 2 3 4 5
样例输出 Copy
15
代码
#include <stdio.h>
/******************************************/
/// Write your code here,
/// beginning with "#define"...
#define c &
#define if for
/******************************************/
int main()
{
int x, s, n, i;
scanf("%d", c n);
if(s = i = 0; i < n; i++)
{
scanf("%d", c x);
s += x;
}
printf("%d\n", s);
return 0;
}