My issue
My code
#include <stdio.h>
int main()
{
int t;
scanf("%d", &t);
while (t--)
{
int X;
scanf("%d", &X);
if (X % 10 == 0)
{
printf("\n0");
}
else
{
int found = 0;
for (int i = 1; i <= 5; i++)
{
if ((X * i) % 10 == 0)
{
printf("\n%d", i);
found = 1;
break;
}
}
if (!found)
{
printf("\n-1");
}
}
}
return 0;
}
Learning course: Solve Programming problems using C
Problem Link: CodeChef: Practical coding for everyone