javascript
Brief description  about Online courses   join in Online courses
View Anusha  D R 's Profile

Not getting proper out put

class Higher {
public static void main(String[] args) {


int m[]={10,60,20,50,80,40,90,70,30,100};

for(int i=0;i<9;i ){
for(int j=1;j<10;j ){
if(m[i] > m[j])
System.out.println("Number with higher value is" m[i]);
else
System.out.println("Number with higher value is" m[j]);
}
}
}
}
Asked by Anusha D R | Jul 26, 2010 |  Reply now
Replies (3)
View arindam ghosh-roy 's Profile
What is your expected output ? Do you want to find the highest number in the array ?
Sep 2, 2010
View anusha d-r 's Profile
Hi Sir,
I have incremented i and j in the program .Before only i have incremented but here it is not showing.I think some error occurred during copying the program.
Aug 7, 2010
View arun kumar das 's Profile
Hi Anusha,

You have not incremented i and j in the for loop. Please try it and let know the result.

Cheers...
JT
Aug 6, 2010