1000: 送分题-A+B Problem

题目描述


Calculate a+b

输入


Two integer ab (0<=ab<=10)

输出


Output a+b

样例输入


1 2

样例输出


3

提示


Q: Where are the input and the output? A: Your program shall always read input from stdin (Standard Input) and write output to stdout (Standard Output). For example you can use 'scanf' in C or 'cin' in C++ to read from stdin and use 'printf' in C or 'cout' in C++ to write to stdout. You shall not output any extra data to standard output other than that required by the problem otherwise you will get a "Wrong Answer". User programs are not allowed to open and read from/write to files. You will get a "Runtime Error" or a "Wrong Answer" if you try to do so. Here is a sample solution for problem 1000 using C++/G++:
Click
It's important that the return type of main() must be int when you use G++/GCCor you may get compile error. Here is a sample solution for problem 1000 using C/GCC:
Click
Here is a sample solution for problem 1000 using PASCAL:
Click
Here is a sample solution for problem 1000 using JAVA: Now java compiler is jdk 1.5 next is program for 1000
Click
Old program for jdk 1.4
Click

来源/分类


语言基础

请先 登录 后评论

1 个回答

admin
#include <stdio.h>

int main()
{
	int a,b;
	scanf("%d %d",&a,&b);
	printf("%d",a+b);
	
	return 0;
}
请先 登录 后评论
  • 1 关注
  • 0 收藏,915 浏览
  • 轩爸 提出于 2019-08-02 20:41