#include <stdio.h>
#include "math.h"
int main()
{
int a, b, x, y;
float d;
printf("输入两个整数: ");
scanf("%d,%d", &a, &b);
x = a / b;
y = a % b;
d = (float)a / b;
printf("商为:%d ", x);
printf("余数为:%d ", y);
printf("小数为:%.5f ", d);
return 0;
}
#include <stdio.h>
#include "math.h"
int main()
{
int a, b, x, y;
float d;
printf("输入两个整数: ");
scanf("%d,%d", &a, &b);
x = a / b;
y = a % b;
d = (float)a / b;
printf("商为:%d ", x);
printf("余数为:%d ", y);
printf("小数为:%.5f ", d);
return 0;
}