Ive got some code that is int but needs to be double as I need it to have values to 1 decimal place.. I've simply changed it to double where it says int but when i compile it it gives an error saying:
found: double
expected: int
:S
Well confused.
Ive changed it to:
But this give me the error... All the other code (double) compiles up until this point, i just cant figure it out.
Help?
found: double
expected: int
:S
Well confused.
Rich (BB code):
int firstarray[][] = {{a,b,c},{d,e,f},{g,h,i}};
System.out.println("The readings are");
display(firstarray);
}
public static void display (int x[][]){
for (int row=0;row<x.length;row++){
for (int column=0;column<x[row].length;column++){
System.out.print (x[row][column]+"\t");
}
System.out.println();
Rich (BB code):
double firstarray[][] = {{a,b,c},{d,e,f},{g,h,i}};
System.out.println("The readings are");
display(firstarray);
}
public static void display (double x[][]){
for (double row=0;row<x.length;row++){
for (double column=0;column<x[row].length;column++){
System.out.print (x[row][column]+"\t");
}
System.out.println();
Help?
Last edited: