(121<x²)→(x>x+5)=1 (A→B=¬A+B)
(x²≤121)+(x>x+5)=1 (при x>0 x>х+5=0)
x²≤121=1
x=11
ответ 11
Var A :array[1..100] of integer;
var i, S :integer;
begin
for i:=1 to 100 do A[i]:=i*3;
S:=0;
for i:=1 to 100 do S:=S+A[i];
Writeln('сумма элементов массива= ',s);
<span>end.
или без лишнего цикла можно так
var A :array[1..100] of integer;
var i, S :integer;
begin
for i:=1 to 100 do
begin
A[i]:=i*3;
S:=S+A[i];
end;
Writeln('сумма элементов массива= ',s);
<span>end.</span></span>
#include <iostream>
#include <cmath>
using namespace std;
void main(){
double result ;<span>
int x,n=0,k = 2;</span><span>
cin >> x >> n;</span><span>
result = cos(pow(x, 1));
for (int i = 2;i<=n;++i)<span>
{
</span><span> if (i != k)</span><span>
result += cos(pow(x, i));</span><span>
else
</span><span> {
</span><span> result -= cos(pow(x, i));</span><span>
k += 3;</span><span>
}</span><span>
}
cout << "result = " << result;<span>
system("pause");
}</span></span></span>
Program abc;
uses crt;
var a,b,c: integer;
begin
write('Введи значение a = ');
readln(a);
write('Введи значение b = ');
readln(b);
write('Введи значение c = ');
readln(c);
writeln(a);
writeln(b);
writeln(c);
end.
Import random
a=int(input())
b=int(input())
arr=[]
for a in range(0, 5):
arr.append(random.randint(a, b))
for a in range(0, 5):
arr.append(arr[a]*arr[a])
for a in arr:
print(a)