#include <iostream>
using namespace std;
void z(int *m, int n, int a, int b)
{
srand(time(NULL));
for(int i=0;i< n;i++) m[i]=a+rand()%(b-a+1);
}
int k(int *m, int n, int a, int b)
{
int s=0;
for(int i=0;i< n;i++) s+=m[i]>=a && m[i]<=b;
return s;
}
int main()
{
int n,a,b,na,nb;
cout<<" Vvedite razmer massiva n: "; cin>>n;
int *m=new int[n];
cout<<"Vvedite diapazon ot a do b: "; cin>>a>>b;
z(m,n,a,b);
for(int i=0;i< n;i++) cout << m[i] << " ";
cout<< endl;
cout<<"number_A number_B: ";
cin>>na>>nb;
cout<<"k="<< k(m,n,na,nb);
delete []m;
cout<<"\nPress Enter for exit\n";
cin.get();
cin.get();
}
Пример:
<span> Vvedite razmer massiva n: 10
Vvedite diapazon ot a do b: 10 50
15 16 31 21 36 34 23 39 31 11
number_A number_B: 20 30
k=2
Press Enter for exit</span>
Пердык пук пук пук пук пукпупкпупк пукпу кпук
Var a:real;
begin a:=2;
while a<2.8 do begin
a:=a+0.1;
writeln(a);
end;
<span>end.</span>
Чтобы в другое время тебя этот ужасный звук не беспокоил: все вместе спустили и всем хорошо)))
<u>PascalABC.NET 3.3.5, сборка 1662 от 29.04.2018</u>
<u>Внимание! Если программа не работает, обновите версию!</u>
begin
var (a,b,x):=(Sqrt(3),Tan(Pi/5),Log10(7));
var z:real;
if x<b then z:=ArcCos(a*a/(a*a+x*x))
else
if x=b then z:=Ln(2+Cos(b*x))
else z:=Abs(Tan(b*x))+2**(-a*x);
Writeln('z(x)=',z)
end.