You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
341 B

#include <bits/stdc++.h>
using namespace std;
//高精度除法小数点位数
int main() {
int n, m, p;
cin >> n >> m >> p;
for (int i = 0; i <= p; i++) {
int r = n % m;
int shang = n / m;
printf("%d", shang);
if (i == 0) printf(".");
n = r * 10;
}
return 0;
}