Maximum Score of Arrays...do you like my Code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

Maximum Score of Arrays...do you like my Code?

public class Main { static int n=4; public static void main(String[] args) { int a[]={1,2,3,4,5}; int max=0; for(int i=0;i<a.length;i++){ if(a[i]>max){ max=a[i]; } } System.out.println(max); } }

2nd Sep 2016, 7:45 PM
Zohrab Alexanian
Zohrab Alexanian - avatar
1 Answer
+ 2
gud
11th Sep 2016, 7:38 PM
Bhushan Gaikwad
Bhushan Gaikwad - avatar