码迷,mamicode.com
首页 > 其他好文 > 详细

1001 - Another A+B

时间:2015-06-08 08:26:05      阅读:119      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!