what is problem in this code

#include<stdio.h>
int main(){
int a,b,c,r,i;
scanf("%d",&a);
scanf("%d",&b);
if(a>b)
c=a-b;
else
c=b-a;
for(i=c;i>0;i=i/10){
r=i%10;}
if(i==0||i==1)
c=c+1000;
else
c=c-1000;
printf("%d",c);
return 0;
}

Ask your question properly. Don’t just paste your code and at least give link to the problem you are asking for…

if(i==0 || i==1)
i==0 always this (if) condition true every time.