code is not running

#include
using namespace std;
int main()
{int T,a[100],b[100],c[100],i;
cin>>T;
cout<<endl;

//to get the input:
for(i=0;i<T;i++)
	{cin>>a[i]>>b[i]>>c[i];
	cout<<endl;
	}
//core code of the problem:
for(i=0;i<T;i++)
	{
		while(c[i])
			{if(a[i]>b[i])
				{b[i]++;
				c[i]--;
				}
			else if(b[i]>a[i])
				{a[i]++;
				c[i]--;
				}
			else if(a[i]==b[i])
				{a[i]++;
				c[i]--;
				}
			}
	if(a[i]>b[i])
	 cout<<a[i]-b[i]<<endl;
	else
	 cout<<b[i]-a[i]<<endl;
	}
return 0;
}

Please provide problem/question link. Ok, I got the problem idea from your question tag.
Here is a little modification in your code.link: https://pastebin.com/DD6CtBAa
Also, improve your code indentation, otherwise no one gonna answers your queries with such messy code.I think you are a newcomer in the field of CP(just my thoughts:)
Happy Coding!

3 Likes
//