📄 12-3.txt
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -