fork download
  1. #include <stdio.h>
  2.  
  3. int main(){
  4. int a,b,n;
  5.  
  6. scanf("%d %d %d", &a, &b, &n);
  7.  
  8. int root = a % b, ans = 0;
  9. for(int i = 0; i < n; i++){
  10. root = root * 10;
  11. if(root >= b) {
  12. ans = root / b;
  13. root = root % b;
  14. }
  15. else ans = 0;
  16. }
  17. return 0;
  18. }
Success #stdin #stdout 0s 5408KB
stdin
25 7 5
stdout
Standard output is empty