游客 Signup | Login
中文 | En

2450 - 求和

从键盘读入5个整数,求这个5个数的和。输出计算公式。行末输出一个换行符。

Input

输入为一行,该行有5个整数,数与数之间由一个空格隔开。

Output

输出这5个数的和的计算公式。行末输出一个换行符。

Examples

Input

1 2 3 4 5

Output

1+2+3+4+5=15

Solution C

#include<stdio.h>

int main()
{
	int a,b,c,d,e,f;
	scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);
	f=a+b+c+d+e;
	printf("%d+%d+%d+%d+%d=%d\n",a,b,c,d,e,f);
	return 0;
	
}

Solution C++

#include<stdio.h>

int main()
{
	int a,b,c,d,e,f;
	scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);
	f=a+b+c+d+e;
	printf("%d+%d+%d+%d+%d=%d\n",a,b,c,d,e,f);
	return 0;
}
Time Limit 1 second
Memory Limit 128 MB
Discuss Stats
上一题 下一题