c语言分数加减法#include int ggg(int a,int b) { int r; while(r!=0) { r=a%b; a=b;b=r; } return a; } int main() { int n,i,a,b,c,d,h,c1,m,hm,th,tc,cm; scanf("%d",&n); for(i=1;i

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/18 20:10:52
c语言分数加减法#includeintggg(inta,intb){intr;while(r!=0){r=a%b;a=b;b=r;}returna;}intmain(){intn,i,a,b,c,d,

c语言分数加减法#include int ggg(int a,int b) { int r; while(r!=0) { r=a%b; a=b;b=r; } return a; } int main() { int n,i,a,b,c,d,h,c1,m,hm,th,tc,cm; scanf("%d",&n); for(i=1;i
c语言分数加减法
#include int ggg(int a,int b) { int r; while(r!=0) { r=a%b; a=b;b=r; } return a; } int main() { int n,i,a,b,c,d,h,c1,m,hm,th,tc,cm; scanf("%d",&n); for(i=1;i

c语言分数加减法#include int ggg(int a,int b) { int r; while(r!=0) { r=a%b; a=b;b=r; } return a; } int main() { int n,i,a,b,c,d,h,c1,m,hm,th,tc,cm; scanf("%d",&n); for(i=1;i
int ggg(int a,int b) { int r; //默认r=0; 所以while 根本就不会执行! while(r!=0) { r=a%b; a=b;b=r; } return a; }