
-----------------------------------
flameZero
Tue Mar 28, 2006 8:50 am

roman numeral special cases
-----------------------------------
hey guys i was wonderin if u could help me out.
i am doing a roman numeral assignment and i am stuck on the special cases ( IX,IC,IV,etc) i have them in a FOR loop and i tested it out by outputtin "hello" before the calculations but the program doesnt see the fact that IX is 9 instead of 11.i have included my java file.import javax.swing.JOptionPane;
 import java.io.*; 
public class Assignment5c {
public static void main(String[] args) {
	
	String romannum;
	int romantotal;
	int x;
	int Y;
	int lengthOfX;
	String substring=" ";
	char quit='y'; 
	int i;
	while (quit=='y'){
	romantotal=0;
	romannum=Keyin.inString("enter a roman numeral:");
	lengthOfX = romannum.length();
	for ( i=0; i