#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
setlocale(LC_ALL,"russian");
int num;
cout << "Введите размер массива: ";
cin >> num;
int a[num];
int sum = 0;
cout << "Вводите элементы массива поочерёдно: " << endl;
for(int i = 0; i<num; i++)
{
cin >> a[i];
if(a[i]%5==0 && a[i]%2==0) // находим в массиве числа, кратные 5 и 2
{
sum = sum + 1;
}
}
cout << "Чётных чисел, кратных пяти и двум: " << sum << endl;
system("pause");
return 0;
}
1
//Вводим a,b,c
Console.WriteLine(hello);
if(a == b || a==c || b==c){
Console.WriteLine("Треугольник равнобедренный");
}else{
Console.WriteLine("Треугольник НЕ равнобедренный");
}
2
int x1,x2,x3,x4;
int x;
//Вводим число x
x1 = (x - (x % 1000)) / 1000;
x2 = ((x - (x % 100)) - (x - (x % 1000))) / 100;
x3 = ((x - (x % 10)) - (x - (x % 100))) / 10;
x4 = x % 10;
if((x1 == 6) || (x1 == 9) || (x2 == 6) || (x2 == 9) || (x3 == 6) || (x3 == 9) || (x4 == 6) || (x4 == 9)){
Console.WriteLine("Входит");
}else{
Console.WriteLine("не входит");
}
3
float x,y,z;
// Вводим x,y,z
if(x >= 0,5 && x<=5,1) Console.WriteLine(x, " Входит");
if(y >= 0,5 && y<=5,1) Console.WriteLine(y, " Входит");
if(z >= 0,5 && z<=5,1) Console.WriteLine(z, " Входит");
4 задания к сожалению не понял
w=q+r;
for i to N do begin
writeln (w);
end;
end.