#include <iostream>
using namespace std;
class Set {
int N, counter = 0;
float A, B;
public:
Set(int N, float A, float B) {
this->N = N;
this->A = A;
this->B = B;
}
void Count() {
for (int i = 0; i < N; i++) {
float x;
cin >> x;
if (A <= x && x <= B)
counter++;
cout << "Count = " << counter << endl;
};
signed main()
{
setlocale(LC_ALL, "Rus");
int N;
cout << "Введите число элементов: (N) ";
cin >> N;
cout << "\nВведите числа A и B: ";
cin >> A >> B;
Set m(N, A, B);
m.Count();
return 0;
#include <iostream>
using namespace std;
class Set {
int N, counter = 0;
float A, B;
public:
Set(int N, float A, float B) {
this->N = N;
this->A = A;
this->B = B;
}
void Count() {
for (int i = 0; i < N; i++) {
float x;
cin >> x;
if (A <= x && x <= B)
counter++;
}
cout << "Count = " << counter << endl;
}
};
signed main()
{
setlocale(LC_ALL, "Rus");
int N;
float A, B;
cout << "Введите число элементов: (N) ";
cin >> N;
cout << "\nВведите числа A и B: ";
cin >> A >> B;
Set m(N, A, B);
m.Count();
return 0;
}