PROGRAM A23;
const
max = 42;
var
с:array[1..max]of real;
x:integer;
i:byte;
BEGIN
writeln('Заполнить линейный массив по формуле c[i]=16*x-i/9-7');
write('Введите x='); readln(x);
writeln(' ');
writeln('Массив' );
for i:=1 to max do begin
с[i]:=16*x - i/9 -7;
write(с[i], ' ');
end;
END.
//Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x64
#include <iostream>
#include <string>
#include <sstream>
using namespace std;
int main()
{
string str = "Hello wordl";
string to_replace, word, result;
stringstream ss( str );
cin >> to_replace;
while (ss >> word)
{
if (word.find(to_replace) != string::npos)
{
word = "...";
}
result += word + " ";
}
cout << result << endl;
}
1.44 *1024 = 1474.56 Кб * 1024 = 1509949,44 байт
1509949,44 байт - 80% = 301989,88 байт
301989,88 байт можно ещё записать
1. 2^10 = 1024
2. 5 бит
3. 12 бит
4. 35 бит
вроде так
const
N=5;
var
a:array [1..N] of integer;
i,k,count:integer;
begin
for i:=1 to N do
begin
a[i]:=random(20);
write(a[i]);
end;
for i:=1 to N do
begin
count:=0;
k:=2;
if a[i] < 2 then count:=1;
while (k*k<=a[i]) and (count = 0) do
begin
if a[i] mod k = 0 then inc(count);
inc(k);
end;
if count = 0 then write(i);
end;
end.