The code is working but only if I take each number one at a time which isnt good.
Thanks in advance
import javax.swing.*;
public class Hamming
{
public static void main(String[] args)
{
int i, m;
int counter = 1;
m = Integer.parseInt(JOptionPane.showInputDialog("Enter number of data bits (positive)"));
int[] number = new int[m];
for(i = 0; i < number.length; i++)
{
number[i] = Integer.parseInt(JOptionPane.showInputDialog("Enter bit string of length "
+m +" entering each number one at a time: #" +counter));
counter++;
}
System.exit(0);
}
}
This post has been edited by blackopts: 01 October 2009 - 10:18 PM

New Topic/Question
Reply




MultiQuote




|