内容:

求两数的整数商 和 余数

输入说明:

一行两个整数

输出说明:

一行两个整数

输入样例:

 
18 4

输出样例 :

4 2
 #include <stdio.h>
int main(void)
{
int num1 = ;
int num2 = ;
scanf("%d %d", &num1, &num2);
printf("%d %d", num1 / num2, num1 % num2);
return ;
}

d007: 求两数的整数商 和 余数的更多相关文章

  1. d008: 求两数的整数商 和 商

    内容: 求两数的整数商 和 商 ,商保留两位小数 输入说明: 一行 两个整数 输出说明: 一行,一个整数,一个实数(两位小数) 输入样例:   12 8 输出样例 : 1 1.50 #include ...

  2. c++作业:输入两个整数,用函数求两数之和。函数外部声明有什么作用?

    #include <iostream> using namespace std; int main(){ //求两数的和? int a,b,s; cout<<"请你输 ...

  3. 【c语言】不用大与小与号,求两数最大值

    // 不用大与小与号,求两数最大值 #include <stdio.h> int max(int a, int b) { int c = a - b; int d = 1 << ...

  4. c++ question 003 求两数大者?

    #include <iostream>using namespace std; int main(){ //求两数中的大者? int a,b; cin>>a>>b; ...

  5. c++程序设计第三版例题1.2 求两数的和

    #include <iostream>using namespace std; int main(){ //求两数之和 int a,b,sum; a=11; b=22; sum=a+b; ...

  6. C 语言实例 - 求两数最小公倍数

    C 语言实例 - 求两数最小公倍数 用户输入两个数,其这两个数的最小公倍数. 实例 - 使用 while 和 if #include <stdio.h> int main() { int ...

  7. C 语言实例 - 求两数的最大公约数

    C 语言实例 - 求两数的最大公约数 用户输入两个数,求这两个数的最大公约数. 实例 - 使用 for 和 if #include <stdio.h> int main() { int n ...

  8. ✡ leetcode 167. Two Sum II - Input array is sorted 求两数相加等于一个数的位置 --------- java

    Given an array of integers that is already sorted in ascending order, find two numbers such that the ...

  9. 【leetcode74】Sum of Two Integers(不用+,-求两数之和)

    题目描述: 不用+,-求两个数的和 原文描述: Calculate the sum of two integers a and b, but you are not allowed to use th ...

随机推荐

  1. 第2个Wiindows程序讲解

    上次,我们一起写了一个Windows窗口程序,这个窗口程序虽然非常简单,但是,代码仍然很多,相信,一定会有很多初学者看见这些代码而感到头疼.不用怕,现在,我们就一起来分析一下这些代码,相信通过我们共同 ...

  2. 9. memcpy() memccpy() memmove() strcpy() memset()

    部分参考: http://www.cppblog.com/kang/archive/2009/04/05/78984.html 表头文件: #include <string.h>定义函数: ...

  3. [Design Pattern] Observer Pattern 简单案例

    Observer Pattern,即观察者模式,当存在一对多关系,例如一个对象一有变动,就要自动通知被依赖的全部对象得场景,属于行为类的设计模式. 下面是一个观察者模式的简单案例. Observer ...

  4. UVA11995【I can guess the data structrue!!】【水】+UVA11991【map用法】

    先看UVA11995 两份代码一份直接用C写的,一份用STL写的 #include <iostream> #include <stdio.h> #include <str ...

  5. java排序算法-选择排序

    public class SelectionSort { private static void selectSortTest() { int[] sortArray = { 5, 2, 4, 1, ...

  6. Tomcat部署问题及解决方法

    1.gradle构建web时报错:Access restriction: The type JPEGImageEncoder is not accessible due to restriction ...

  7. jsp 常用9大内置对象

    |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ...

  8. [转] Makefile中调用Shell

    1.在Makefile中只能在target中调用Shell脚本,其他地方是不能输出的.比如如下代码就是没有任何输出: VAR="Hello" echo "$(VAR)&q ...

  9. 【转】app瘦身

    iPhone经过这几年的发展,已经发生了很大的变化,例如屏幕变得更加多样,尺寸更多,内存变得更大,CPU的架构也在变化.伴随着iPhone的变化,iOS也在变化,例如AutoLayout.size c ...

  10. Universal-Image-Loader 基本使用

    简介 https://github.com/nostra13/Android-Universal-Image-Loader 项目的结构:每一个图片的加载和显示任务都运行在独立的线程中,除非这个图片缓存 ...