1001 - Another A+B

                                                                 

                             1001 - Another A+B

Description

Give you an integer a, you are to find two another integers which sum is a.
Input
Multiply Cases. For each line, there is an Integer a.
Output
For each test case, you should two Integers b and c, and b+c=a in each line.
Sample Input
10
11
Sample Output
1 9
3 8  
  
  1. #include<stdio.h>
  2. #include<string.h>
  3. int main()
  4. {
  5. int a;
  6. int b,c;
  7. b = 1;
  8. while(scanf("%d",&a) != EOF){
  9. printf("%d %d\n",b,a-1);
  10. }
  11. }
别问我为什么

版权声明:本文为博主原创文章,未经博主允许不得转载。

posted on 2015-06-03 01:07  zmrlinux  阅读(161)  评论(0)    收藏  举报

导航