Всего 16 клеток. Из формулы количества информации:
<span>2^i = 16 получаем i = 4 бита.</span>
#include <iostream>
#include <cmath>
using namespace std;
int main() {
int n;
float s = 1,b = 0;
cout << "n=";
cin >> n;
for (int i=2; i<=n; i++){
b=(1/sqrt(i));
s += b;
}
cout <<"s="<< s << endl;
return 0;
}
Ответ:
program HelloWorld;
var t, y, a, b: real;
begin
a := -0.5;
b := 1;
writeln('Input t');
read(t);
if (t >= 1) and (t <= 2) then
y := a * (t * t) * Ln(t) ;
if t < 1 then
y := 1;
if t > 2 then
y := Exp(a * t) * Cos(b * t);
writeln(y);
end.
Объяснение: