Problem Description
    Calculate A + B.
Input
    Each line will contain two integers A and B. Process to end of file.
Output
    For each case, output A + B in one line.
Sample Input
    1 1
Sample Output
    2
 
 
Code:
 1 #include <stdio.h>
2 main()
3 {
4 int A,B;
5
6 while(scanf("%d%d",&A,&B)!=EOF)
7 {
8 printf("%d\n",A+B);
9 }
10 }
Tips:
    Process to end of file.  //使用while循环,终止于EOF。
    output A + B in one line.  //printf需输出"/n"。

相关文章:

  • 2021-05-23
  • 2022-03-05
  • 2021-11-04
  • 2022-12-23
  • 2022-12-23
  • 2022-02-18
  • 2021-09-06
猜你喜欢
  • 2021-09-18
  • 2021-06-02
  • 2021-09-25
  • 2021-06-14
  • 2022-12-23
  • 2022-12-23
  • 2021-07-22
相关资源
相似解决方案