Вторая.
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
int main()
{
double a[4][4];
int mass[4] = { 0 };
for(int i = 0; i < 4; i++)
{
for(int j = 0; j < 4; j++)
{
cin >> a[i][j];
}
}
cout << endl;
for(int i = 0; i < 4; i++)
{
for(int j = 0; j < 4; j++)
{
if(a[i][j] < 0.0)
{
mass[i]++;
}
}
}
for(int i = 0; i < 4; i++)
{
cout << mass[i] << ' ';
}
cout << endl;
return 0;
}
Program yravnenie;
Var
a,b,c,D,x1,x2,p,q:Real;
Begin
Repeat
Write('a= ');
Readln(a);
if a=0 then writeln('Error: a=0. Enter another value');
Until a<>0;
Write('b= ');
Readln(b);
Write('c= ');
Readln(c);
p:=b/a;
q:=c/a;
D:=Sqr(p/2)-q;
If D>0 then
begin
Writeln('x1 = ',-p/2-Sqrt(D):0:5);
Writeln('x2 = ',-p/2+Sqrt(D):0:5);
end
else
If D=0 then
Writeln('x1 = x2 = ',-p/2:0:5)
else
begin
Writeln('x1 = ',-p/2:0:5,'-i*',Sqrt(-D):0:5);
Writeln('x2 = ',-p/2:0:5,'+i*',Sqrt(-D):0:5);
end;
Readln;
End.
I=7 N=2^i
Найти N N=128
Диапазон чисел от 1 до 128