This will work, but you need to be able to explain it as part of your assignment. You could start by adding some print/debug statements to show what happens at each stage.
int calc(int number)
{
if (number == 1)
return number;
int value = number;
for (int i = number; i > 1; --i)
{
value += (int)Math.pow(10, i - 1) * number;
}
return value + calc(number - 1);
}