My issue
My code
// Update the code below to solve this problem
#include <iostream>
#include <string>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
int X, Y;
cin>>X>>Y;
if(X%10==0 && Y%10==0){
cout<<((Y/10)-(X/10))<<endl;
}
else{
if(X%10!=0){
cout<<abs(((X/10)+1)-(Y/10))<<endl;
}
else{
cout<<(((Y/10)+1)-(X/10))<<endl;
}
}
}
return 0;
}
Learning course: Solve Programming problems using C++
Problem Link: CodeChef: Practical coding for everyone