Maximum Score of Arrays...do you like my Code? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 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 Réponse
+ 2
gud
11th Sep 2016, 7:38 PM
Bhushan Gaikwad
Bhushan Gaikwad - avatar