rev='made'/> name='keywords'/> name='author'/> ANURANAN: UVa Solution 11689: Soda Surpler

Welcome Note

Hi,
I'm Anisuzzaman Babla . I am a full stack Android Application Developer. I am working with Android for more than two years. I have completed my graduation from IIT, Jahangirnagar University. I have developed a series of commercially successful apps on Android. Moreover, 10+ of my Apps are live at Google play store. .
Thank You

UVa Solution 11689: Soda Surpler

#include<cstdio>
int main()
{
    int N,e,f,c,a,b,d,i;
    while (scanf("%d",&N)==1)
    {
        for (i=0;i<N;i++)
        {
            scanf("%d %d %d",&e,&f,&c);
            b=0;
            d=e+f;
            while (d>=c)
            {
                a=d/c;
                b=b+a;
                d=a+(d%c);
            }
            printf("%d\n",b);
        }
    }
    return 0;
}