hey what bug in my code on submitting the codechef judge says wrong answer and here is the problems [link].1
program SMCD6;
uses Math;
var
<var> T,A,B,M</var>:longint;
begin
read(T);
while T <> 0 do
begin
read(A,B,M);
if abs(B-A) = M then writeln(0)
else writeln(abs(B-A) div M);
T := T-1;
end;
end.
you can see the code in c++ to but by other user here it is
#include <iostream>
using namespace std;
int main(){
int t = 0;
cin >> t;
while(t--){
int a,b,m = 0;
cin >> a;cin >> b;cin >> m;
cout << (b-a)/m << endl ;
}
return 0;
}