150道三位数除以二位数的计算题
150道三位数除以二位数的计算题
150道三位数除以二位数的计算题
150道三位数除以二位数的计算题
我可以写程序给你解决,你把格式发过来
是不是XXX/XX啊?我给你化成分数,你把这些东西整理好放在一个文件里,然后我一行行用程序解决掉
#include
intgcd(inta,intb){returna%b?gcd(b,a%b):b;}
intmain()
{
x09intn,m,d,CS=1;
x09freopen("C:a.txt","r",stdin);//你把要算的式子放在C盘下的a.txt里,以XXX/XX的格式,一行行放
x09freopen("C:b.txt","w",stdout);//这里输出结果
x09while(scanf("%d/%d",&n,&m)!=EOF)
x09{
x09x09printf("%d/%d=",n,m);
x09x09d=gcd(n,m);
x09x09n/=d;
x09x09m/=d;
x09x09if(n==0)printf("%d",n);
x09x09elseif(m==1)printf("%d",n);
x09x09elseprintf("%d/%d",n,m);
x09x09puts("");
x09}
x09return0;
}
不行,偶是四年级的学生,不会分数
133/19924/44276/23448/32480/48228/12245/49940/47740/74396/99776/97747/83836/76322/23330/55132/11735/35320/32790/79462/77220/55550/50602/86465/93267/89738/41194/97152/19550/55368/46315/45387/43396/66330/15468/26162/18162/81234/78966/46435/87216/72572/26365/73292/73504/42585/45819/91684/57483/23765/45576/32300/15273/13256/32390/30833/49120/24288/72510/34496/62114/57486/54468/36588/84968/88450/90345/69300/30285/19308/44438/73132/12308/22704/44261/87286/26665/35792/33116/29816/34585/65902/82126/21582/97513/57540/36608/32441/21616/56400/25220/44476/68650/65243/27340/20860/43216/24344/86104/26803/73100/25336/56240/48370/74207/23988/52812/58660/66924/42425/25342/38770/35200/10270/90178/89448/64935/55855/57528/24159/53726/33496/62544/68180/45136/68217/31400/80646/38440/20675/75572/44270/54220/44342/19100/20220/55388/97792/99690/46187/17285/95464/29504/36196/49264/88612/34870/58306/18315/63550/55