6-P-3
作者:互联网
#include<stdio.h>
int main(void)
{
int num,denom;
int m, n, x;
int i = 0;
printf("Please enter two integer:");
scanf_s("%d/%d", &num, &denom);
n = num;
m = denom;
if (n > m)
{
x = n;
n = m;
m = x;
}
while (n != 0)
{
i = n;
n = m % n;
m = i;
}
printf("In lowest terms:%d/%d", num / m, denom / m);
return 0;
}
标签:,lowest,int,num,printf,denom,include 来源: https://blog.csdn.net/suitaox26456/article/details/120318105