#include<stdio.h>

#include<math.h>

int main()

{

//declare the integers

int M=0,A=0,B=0;

int T;

int flag;

//enter number of test cases

printf("\nenter the number of testcases:\n");

scanf("%d",&T);

for(T;T>=1 && T<=pow(10,5);T–)

{

//enter the values of the integers

printf(“enter the 1st number:”);

scanf("%d",&A);

printf("\nenter the 2nd number:");

scanf("%d",&B);

printf("\nenter the number to be divided by:");

scanf("%d",&M);

flag=0;

while(A<=B && M>=1 && M<=pow(10,9) && B>=1 && B<=pow(10,9) && A>=1 && A<=pow(10,9))

{

if(A%M==0 )

{

flag++;

A++;

}

else

{

A++;

}

}

printf("\nthe count of numbers between a and b which are divisible by m: %d",flag);

printf("\n");

}

}