Первое задание:
1) 3
2) 6
3) 5
Второе задание:
1) 1
2) 3
Третие:
//Язык программирования java
package com.niksonbinsk;
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int space_left = 0;
int count = 0;
Scanner s = new Scanner(System.in);
ArrayList<Integer> str = new ArrayList<>();
while(space_left != 30){
System.out.println("Enter next num:");
str.add(s.nextInt());
space_left++;
}
for(int i =0;i<30;i++){
if(str.get(i) % 2 == 0){
count++;
}
}
System.out.println(count);
}
}
Объяснение:
#include <bits/stdc++.h>
using namespace std;
int main ()
{
int x1,y1,x2,y2;
cin >> x1 >> y1;
cin >> x2 >> y2;
cout << x1 << "+" << y1 << "=" << (x1+y1) << endl;
if (y2>x2){cout << y2 << "-" << x2 << "=" << (y2-x2);}else {cout << x2 << "-" << y2 << "=" << (x2-y2);};
return 0;
}