What are the errors that you are getting? I don't have a compiler either and don't have the time to install Visual Studio right now. Without knowing what the compilers reports as errors, the only error I see off hand is:
Code:
if(lens[i]>largest)
largest=i++;
sum+=lens[i];
which should be
Code:
if(lens[i]>largest)
largest=lens[i]; //i++ changed to lens[i]
sum+=lens[i];
i++; //i++ added because removed previously