蓝桥算法训练 A+B problem JAVA

问题描述
  Given two integers A and B, your task is to output their sum, A+B.
输入格式
  The input contains of only one line, consisting of two integers A and B. (0 ≤ A,B ≤ 1 000)
输出格式
  The output should contain only one number that is A+B.
样例输入
1 1
样例输出
2
思路:看到英文题目也不要放弃,问题描述大概意思就是输入两个字母A和B然后求和,输出一个整数结果。是不是很简单?一个英语渣渣的呐喊,哈哈哈哈~~

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int A = scanner.nextInt();
		int B = scanner.nextInt();
		System.out.println(A + B);
	}

小剧场:人们到底能否得到幸福,完全在于内心的想法。

发布了110 篇原创文章 · 获赞 113 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/weixin_43771695/article/details/104714091