Program Pr1;
uses crt;
var stroka,tmp:string;
i:integer;
Begin
clrscr;
readln(stroka);
for i:=1 to length(stroka) do if stroka[i]=' ' then tmp:=copy(stroka,1,i-1);
delete(stroka,1,length(tmp)+1);
stroka:=stroka+' '+tmp;
writeln(stroka);
end.
1.
program z1;
var a,b,c,x1, x2:real;
begin
writeln('введите коэффициенты А (отличное от нуля), В и С ');
readln(a,b,c);
if sqrt(b*b-4*a*c)>0 then
begin
x1:=(-b+sqrt(b*b-4*a*c))/2/a;
x2:=(-b-sqrt(b*b-4*a*c))/2/a;
writeln('x1=',x1,', x2=',x2);
end
else if sqrt(b*b-4*a*c)=0 then
begin
x1:=(-b+sqrt(b*b-4*a*c))/2/a;
writeln('x=',x1)
end
else writeln('уравнение не имеет корней');
end.
2.
program z1;
var b,c,x:real;
begin
writeln('введите коэффициенты B (отличное от нуля) и С ');
readln(b,c);
x:=-c/b;
writeln('x<',x);
end.
Program Jopascal;
Var
i, A: longint;
x,
u, j,
N, m : longint;
Function FDiv (A, left : LongInt) : LongInt;
var
d,
i : longint;
begin
d := 1;
for i := left to Trunc (Sqrt (A)) do
if (A mod i = 0)
then
begin
d := i;
Break;
end;
if (d <> 1)
then
FDiv := d
else
FDiv := A;
end;
Function g (N, u : longint) : longint;
var
i : longint;
begin
i := 0;
while (N mod u = 0)
do
begin
Inc (i);
N := N div u;
end;
g := i;
end;
Begin
Assign (Input, 'input.txt');
Assign (Output, 'output.txt');
Reset (Input);
Read (A);
Close (Input);
m := 0;
N := 1;
i := FDiv (A, 2);
u := 2;
while (A > 1)
do
begin
N := N * i;
j := 0;
while (A mod i = 0)
do
begin
Inc (j);
A := A div i;
end;
if (j > m)
then
begin
m := j;
u := i;
end;
i := FDiv (A, i + 2);
end;
x := 1;
while (g (N * x, u) * N * x < m)
do
Inc (x);
N := N * x;
ReWrite (Output);
Write (N);
Close (Output);
End.
На языке Си:
#define n 10
int main()
{
int mn=1;
int mas[n];
for(int i=0; i<n;i++)
{
mas[i]=10+rand() % 100;
printf(" %d " ,mas[i]);
}
for(int j=0; j<n; j++)
{
if(mas[j] %2 ==0)
{
mn = mas[j]*mn;
}
}
printf(" Proizvedenie chetnix elementov ravno: ", mn);
return 0;
}
1001011 =
![2^{6} *1+ 2^{5} *0+ 2^{4} *0+ 2^{3} *1+ 2^{2} *0+ 2^{1} *1+ 2^{0} *1](https://tex.z-dn.net/?f=+2%5E%7B6%7D+%2A1%2B++2%5E%7B5%7D+%2A0%2B+2%5E%7B4%7D+%2A0%2B+2%5E%7B3%7D+%2A1%2B+2%5E%7B2%7D+%2A0%2B+2%5E%7B1%7D+%2A1%2B+2%5E%7B0%7D+%2A1)
=<span> 64 + 0 + 0 + 8 + 0 + 2 + 1 = 75</span>