首页 > 其他 > 详细

1001 - Another A+B

时间:2015-06-08 08:25:09      阅读:170      评论:0      收藏:0      [点我收藏+]

                                                                 

                             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. }
不要问我为什么

1001 - Another A+B

原文:http://www.cnblogs.com/mengfanrong/p/4560051.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!