Ad Code

Responsive Advertisement

1116 - Dividing X by Y

Author: Ismail Hosen

Daffodil International University





Problem Link

//Please follow from main function



#include<stdio.h>


int main()


{


    int i,n,x,y;


    double m;


    scanf("%d", &n);


    for(i=1; i<=n; i++)


    {


        scanf("%d %d", &x, &y);


        if(y==0)


        {


            printf("divisao impossivel\n");


        }


        else


        {


            m=x/(y*1.0);


            printf("%.1lf\n",m);


        }


    }


    return 0;


}





Post a Comment

0 Comments