Помогите решить 2 задачи: Задача 1 и Задача 2 Код задачи 1:
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int num;
if (a >= 1)
    num = + 1;
if (b >= 1)
    num = + 1;
if (c >= 1)
    num = + 1;
System.out.println(num);
Код задачи 2:
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int res1, res2;
if (a >= 1)
    res1 = + 1;
if (a <= 0)
    res2 = + 1;
if (b >= 1)
    res1 = + 1;
if (b <= 1)
    res2 = + 1;
if (c >= 1)
    res1 = + 1;
if (c <= 1)
    res2 = + 1;
System.out.println("количество отрицательных чисел: " + res2);
System.out.println("количество положительных чисел: " + res1);
В обоих случаях пишет что int который нужно вывести не инициализирован.