This C Program How many test you want to make.
#include <stdio.h>
main()
{
int t,i,j,r,a;
printf("How many test you want to make:");
scanf("%d",&t);
int a[i],b[i],sum[i];
for(i=0;i<t;i++)
{
printf("%d.Enter A & B:",i+1);
scanf("%d %d",&a[i],&b[i]);
}
for(i=0;i<t;i++)
{
for(j=a[i];i<=b[i];j++])
{
if(j%2!=0)
sum[i]=sum[i]+j;
else
{
a=j*2;
if(a>9)
{
r=last(a);
sum[i]=sum[i]+r;
}
}
}
}
}
int last(int x)
{
int rem;
while(x!=0)
{
rem=x%10;
x=0;
}
return rem;
}