#include<iostream>
using namespace std;
int main(){
    long double a,b,n;
    while(cin>>a>>b>>n){
        int ans=0;
        a/=b;
        while(n--){
            a*=10;
            ans+=int(a)%10;
            cout<<a<<"  "<<ans<<endl;
            a-=int(a);
        }
        cout<<ans<<endl;
    }
}