** Consider the following sequence: 7,77,777, 7777,... Let T be the smallest element in this sequence that is divisible by 2003. How many digits does T have?** enter code here
#include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
int a=0;
int count =0;
for(int i=1;;i++);
{
a=a*10+7;
if (a%2003==0)
{
break;
}
else
{
count++;;
}
}
cout << count+1 ;
return 0;
}