Problem Description

Your task is to Calculate a + b.
Too easy?! Of course! I specially designed the problem for acm beginners. 
You must
have found that some problems have the same titles with this one, yes,
all these problems were designed for the same aim.

Input

The input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line.

Output

For
each pair of input integers a and b you should output the sum of a and b
in one line, and with one line of output for each line in input.

Sample Input

1 5
10 20

Sample Output

6
30
 #include<iostream>
#include<string>
using namespace std;
int main()
{
int a,b;
int sum;
string result;
char s[];
while(cin>>a>>b)
{
if(a == && b == )
break;
sum = a+b;
sprintf(s, "%d",sum);
result += s;
result += "\n";
}
cout<<result;
return ;
}

武汉科技大学ACM :1001: A+B for Input-Output Practice (I)的更多相关文章

  1. 武汉科技大学ACM :1008: A+B for Input-Output Practice (VIII)

    Problem Description Your task is to calculate the sum of some integers. Input Input contains an inte ...

  2. 武汉科技大学ACM :1007: A+B for Input-Output Practice (VII)

    Problem Description Your task is to Calculate a + b. Input The input will consist of a series of pai ...

  3. 武汉科技大学ACM :1006: A+B for Input-Output Practice (VI)

    Problem Description Your task is to calculate the sum of some integers. Input Input contains multipl ...

  4. 武汉科技大学ACM :1005: A+B for Input-Output Practice (V)

    Problem Description Your task is to calculate the sum of some integers. Input Input contains an inte ...

  5. 武汉科技大学ACM :1004: A+B for Input-Output Practice (IV)

    Problem Description Your task is to Calculate the sum of some integers. Input Input contains multipl ...

  6. 武汉科技大学ACM :1003: A+B for Input-Output Practice (III)

    Problem Description Your task is to Calculate a + b. Input Input contains multiple test cases. Each ...

  7. 武汉科技大学ACM :1002: A+B for Input-Output Practice (II)

    Problem Description Your task is to Calculate a + b. Input Input contains an integer N in the first ...

  8. 武汉科技大学ACM:1006: 我是老大

    Problem Description 今年是2021年,正值武汉科技大学 ACM俱乐部成立10周年.十周年庆祝那天,从ACM俱乐部走出去的各路牛人欢聚一堂,其乐融融.庆祝晚会上,大家纷纷向俱乐部伸出 ...

  9. 武汉科技大学ACM:1005: Soapbear and Honey

    Problem Description Soapbear is the mascot of WHUACM team. Like other bears, Soapbear loves honey ve ...

随机推荐

  1. js-ajax实现获取xmlHttp对象

    //获取xmlHttp对象 function createXMLHttp() { var xmlhttp; //对于大多数浏览器适用 if (window.XMLHttpRequest) { xmlh ...

  2. iOS使用VLC

    简       注册登录 添加关注 作者 牵线小丑2016.03.18 10:42 写了4836字,被38人关注,获得了43个喜欢 iOS使用VLC 字数946 阅读698 评论1 喜欢14 简介 库 ...

  3. android防止系统截屏

    protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow() ...

  4. 脚本两则--用于快速部署HADOOP,SPARK这些(特别是VM虚拟机模板部署出来的)。。

    感觉可能只是适合我自己的部署习惯吧,且只针对CENTOS6及以下版本,以后有时间,可能还是要改进.. 1,从VM的模块产生的虚拟机,如何快速搞定网络配置? #!/bin/bash #usage:./i ...

  5. 主流屏幕对比:IPS/LTPS/CGS/IGZO/AMOLED

    IPS.LTPS.CGS.IGZO.AMOLED都是什么屏幕又有什么区别?目前的手机屏幕技术实在太多,本文旨在介绍各种面板以及屏幕技术,便于大家更好地进行区分. 近年来手机屏幕技术层出不穷,早在几年前 ...

  6. C#之VS2010开发Web Service

    一:创建web service vs2010软件默认的framework是4.0版本,所以想创建web服务的时候压根看不到web服务应用程序.网上有人说vs2010的web service 跟wcf合 ...

  7. 快速生成apk 自动发布到网站 便于测试

    遇到的问题: 开发者生成的apk 需要不断给 测试安装让他们测试.有没有脚本自动将最新apk上传到服务器,让测试自己安装测试呢?mac电脑 怎么自己搭建文件服务器  启动Tomcat功能在这里不在赘述 ...

  8. windows 编程 —— 菜单以及其他资源

    目录: 1.资源的种类 2.资源的定义方法(IDE:VC++) 3.资源的获取 4.资源的使用与消息处理函数   1.资源的种类 windows 的常用的资源包括:图示 .游标. 字符串. 自订资源. ...

  9. JavaScript中判断对象类型的种种方法

    我们知道,JavaScript中检测对象类型的运算符有:typeof.instanceof,还有对象的constructor属性: 1) typeof 运算符 typeof 是一元运算符,返回结果是一 ...

  10. ViewPager 详解(四)----自主实现滑动指示条

    前言:前面我们用了三篇的时间讲述了有关ViewPager的基础知识,到这篇就要进入点实际的了.在第三篇<ViewPager 详解(三)---PagerTabStrip与PagerTitleStr ...