Chinaunix首页 | 论坛 | 博客
  • 博客访问: 99241
  • 博文数量: 102
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1011
  • 用 户 组: 普通用户
  • 注册时间: 2014-01-15 13:58
个人简介

普普通通一个人

文章分类

全部博文(102)

文章存档

2018年(1)

2015年(13)

2014年(88)

我的朋友

分类: C/C++

2014-01-15 14:49:07


点击(此处)折叠或打开

  1. /* Calculation two integers + * - / % */
  2. /* Input: two integers */
  3. /* Output:
  4. the sam is:
  5. the difference is:
  6. the quotient is:
  7. the remainder is:
  8. */
  9. #include<stdio.h>
  10. int main()
  11. {
  12.     int x,y;
  13.     printf("Please Enter two integers:");
  14.     scanf("%d%d", &x, &y);
  15.     printf("The sam is: %d\n", x+y);
  16.     printf("The difference is: %d\n", x-y);
  17.     printf("The product is: %d\n", x*y);
  18.     printf("The quotient is: %d\n", x/y);
  19.     printf("The remainder is: %d\n", x%y);
  20.     return 0;
  21. }

阅读(163) | 评论(0) | 转发(0) |
0

上一篇:判断奇数偶数

下一篇:计算两整数的和

给主人留下些什么吧!~~