12-3.txt
来自「自己开发的c0文法编译器」· 文本 代码 · 共 38 行
TXT
38 行
void swap(int x,int y)
{
int temp;
temp=x;
x=y;
y=temp;
}
int md(int x,int y)
{
return (x-x/y*y);
}
void main()
{
int a,b,c,temp1,temp2,result_1,result_2;
printf("Input a : ",0);
scanf(a);
printf("Input b : ",0);
scanf(b);
temp1=a;
temp2=b;
if (temp1!=0)
{
printf("temp1 = ",temp1);
printf("temp2 = ",temp2);
swap(temp1,temp2);
printf("temp1 = ",temp1);
printf("temp2 = ",temp2);
c= md(a,b);
printf("mod(a,b) = ", c);
}
result_1=temp2;
result_2=a*b/result_1;
printf(" ",result_1);
printf(" ",result_2);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?