import java.util.*;
class Main{
public static void main(String[] args) {
int[] data = {1,2,3,4,5,6,7,8,9,10};
int Max = data[0];
int Min = data[0];
for(int i = 1 ; i < a.length; i++){
if(Max < data[i]){
Max = data[i];
}else if(Min > data[i]{
Min = data[i];
}
}
System.out.println(Max);
}
}
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme