Description
Calculate a+b
Input
Two integer a,b (0<=a,b<=10)
Output
Output a+b
Sample Input
1 2
Sample Output
3
JAVA:
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner cin=new Scanner(System.in);
- int a=cin.nextInt(),b=cin.nextInt();
- System.out.println(a+b);
- }
- }
结果:
C:
- #include <stdio.h>
- int main(){
- int a, b;
- scanf("%d %d",&a, &b);
- printf("%d\n",a+b);
- return 0;
- }
结果:
阅读(1760) | 评论(0) | 转发(0) |