#include <stdio.h>
int main()
{
int a,b;
char ch;
do
{
printf("input number\n");
scanf("%d,%d",&a,&b);
if(a%b==0)
{
printf("%d/%d=%d\n",a,b,a/b);
printf("%d\n",a/b);
}
else
{
printf("%d/%d=%d...%d\n",a,b,a/b,a%b);
printf("%d %d\n",a/b,a%b);
}
printf("是否继续?[y/n]");
while((ch=getchar())!='\n');
}
while((ch=getchar())=='y');
return 0;
}
8
最新推荐文章于 2024-02-23 15:19:30 发布