本编仅限于除数是低精度的情况!!!
基本思想
一位数一位数地与除数相除,余数乘10加入下一位上
举例说明
148除以6
首先用1除以6,得0,余1
再用(1x10+4)除x以6,得2,余2(1是上一位的余数,4是这一位上的数)
再用(2x10+8)除以6,得4,余4(2是上一位的余数,8是这一位的数)
所以结果为024,即24
see the code
#include <bits/stdc++.h>
using namespace std;
int main()
{
char a[100];//被除数
int b;