Massivning manfiy max va musbat max elementlarini yig’indisini toping
import java.util.Scanner;
public class Max {
public static void main(String[] args) {
Scanner son = new Scanner(System.in);
int man_max = 0;
int mus_max = 0;
System.out.print("Massivning o'lchamini kiriting:");
int n = son.nextInt();
int[] a = new int[n];
for (int i = 0; i < n; i++) {
System.out.print("a["+i+"]=");
a[i] = son.nextInt();
if(a[i]<0){
man_max = a[i];
}
}