Hi I have this problem with a recursion method which supposed to convert numbers into roman numerals.

I am giving a number, and the num variable I wrote should change by the length of the number, so if it's a 4digit number the given number will be divided by 1000 ,3digits /100.. .

From some reason it does that for the first time and then the number stay's the same.

So my output for 4321 is: MMMMCCCCXXXXIIII.

Any ideas what could be the problem?

Here's part of the code (one method out of two):

public static String num2Roms (int a){

String numstr = (String) ""+a;

int digs = numstr.length()-1; // set the length of the number.

int num;

switch (digs) {

case 0: num = a/1; break;

case 1: num = a/10; break;

case 2: num = a/100; break;

default:num = a/1000; break;

}

if (a == 0) //base case.

return "";

else {

return converter (digs, num, a);

}

}

//thanks.