N = int (input ())
MAS = list (map (int, input().split()))
X = int(input())
answ = 0
for elem in MAS:
if elem == X:
answ += 1
print (answ)
Не видно, если хочешь можешь удалить мой ответ, но я лично не вижу из-за темноты=(
#include <iostream>
using namespace std;
int main()
{
setlocale(LC_ALL, "Russian");
float a, b, x;
cout << "Введите a и b: " << endl;
cin >> a;
cin >> b;
x = b / a;
cout << x;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a,b,c,d1,d2,d=0,n=0;
srand (time(NULL));
a = rand() % 50 + 1;
b = rand() % 50 + 1;
c = rand() % 20 + 1;
while (c>a) a = rand() % 50 + 1;
while (c>b) b = rand() % 50 + 1;
printf ("%d %d %d\n", a, b, c);
d1 = a; d2 = b;
while (d1>=c){
d2 = b;
while (d2>=c){ n++; d2 -= c; }
d1 -= c;
}
printf("%d\n", n);
for (int i=0; i<(10-1); i++) d += n;
d = -d;
printf("%d", d);
return 0;
}
Пример:
<span>27 42 4
60
-540</span>