then it just goes back to saying
smallestIndex1.java:17: error: bad operand types for binary operator '<'
Type: Posts; User: mikeymike
then it just goes back to saying
smallestIndex1.java:17: error: bad operand types for binary operator '<'
yea that code works and i guess thats my problem once the seconds dimension is added i cant seem to figure it out
--- Update ---
besides add the aspect of [j] i guess
public class smallestIndex1
{
public static void main( String [] args )
{
//declare and instantiate the array
int [] smallestIndex = { 13,11,12,10,14,15 } ;
int min = 0;
for (...
i want the value of the index but i have tried everything and either it gives me the value from the array or it will just output a 0
double [] [] temp = { { 43, 3 },
{ 50, 6 },
{ 66, 32},
{ 68, 40},
{ 75, 55},
{ 88, 50},
{ 90, 66},
{ 98, 65},
{ 85,...
well cuz i need to use a .get somewhere in my program and
isnt it comparing indexLow and indexHigh to the numbers i have in my array ?
cuz i would think it would need to be
if(temp[i][1] < temp...
double [] [] temp = { { 43, 3 },
{ 50, 6 },
{ 66, 32},
{ 68, 40},
{ 75, 55},
{ 88, 50},
{ 90, 66},
{ 98, 65},
{ 85,...
1. reads and stores
2. average high
3. average low
4.index high
5. index low
with all these methods needed for this program should i set up a declared class file and then a seperate program...
I wish I could but I'm doing this from a iPhone right now I don't have access to a comp it's te code used in entry #9. I can't seem to get the indexes to show instead of the elements
my question is first why with that code it says the index is 3 and not [0][1]
ok but I'm out putting 3 instead of [0] [1] with that last code I entered. in a proper output for a array with 12 rows and 2 columns would be ?
ok so i think i got a little further with
import java.util.Scanner;
public class Array2
{
public static void main( String [] args )
{
double [] [] temp = { { 43, 3 },
{ 50, 6 },...
am i missing a line of code ? or is what i have correct just not set up correct
ok i tried
if ( temp[i] < temp[0][1] )
indexLowTemp = i;
and if ( temp[0][1] < temp[indexLowTemp] )
indexLowTemp = i;
and still get the same error
well I have found the min and max of an index with the < and > in a single dimension array. and I need to get the min and max of the array. with this array all the bigger number are in column 0 while...
1. reads and stores
2. average high
3. average low
4.index high
5. index low
so far i have...
import java.util.Scanner;
public class Array