Begin var a: integer; readln(a); for i: integer := 1 to abs(a) do if (a mod i = 0) then writeln('> ', i); end.
function Simple(a: integer): boolean; begin result := true; for i: integer := 2 to (a div 2) do if (a mod i = 0) then begin result := false; break; end; end;
begin var a: integer; readln(a); writeln(Simple(a)); end.
var a: integer;
begin readln(a); for i: byte := length(a.ToString()) downto 1 do write(a.ToString()[i]); end.
function Simple(a: integer): boolean; begin result := true; for i: integer := 2 to (a div 2) do if (a mod i = 0) then begin result := false; break; end; end;
function par(a: integer): string; begin for i: byte := length(a.ToString()) downto 1 do result += a.ToString()[i]; end;
begin var a: integer; readln(a); for i: integer := 1 to abs(a) do if ((a mod i = 0) and (Simple(a)) and (par(a) = inttostr(i))) then writeln('> ', i); end.
var a: integer;
readln(a);
for i: integer := 1 to abs(a) do
if (a mod i = 0) then
writeln('> ', i);
end.
function Simple(a: integer): boolean;
begin
result := true;
for i: integer := 2 to (a div 2) do
if (a mod i = 0) then
begin
result := false;
break;
end;
end;
begin
var a: integer;
readln(a);
writeln(Simple(a));
end.
var
a: integer;
begin
readln(a);
for i: byte := length(a.ToString()) downto 1 do
write(a.ToString()[i]);
end.
function Simple(a: integer): boolean;
begin
result := true;
for i: integer := 2 to (a div 2) do
if (a mod i = 0) then
begin
result := false;
break;
end;
end;
function par(a: integer): string;
begin
for i: byte := length(a.ToString()) downto 1 do
result += a.ToString()[i];
end;
begin
var a: integer;
readln(a);
for i: integer := 1 to abs(a) do
if ((a mod i = 0) and (Simple(a)) and (par(a) = inttostr(i))) then
writeln('> ', i);
end.
#include <iostream>
#include <Windows.h>
using namespace std;
void main()
{
setlocale(LC_ALL, "Russian");
float a, b, c;
Start:
system("CLS");
cout << "Введите 3 действительных числа:\n";
cin >> a;
cin >> b;
cin >> c;
if (a>b && a>c)
cout << "Вот что получится если удвоить ваши числа: " <<a*2<< b*2<<c*2<<"\n";
else
cout << "Заменяю ваши числа обсолютными значениями: " <<abs(a)<<abs(b)<<abs(c)<< "\n";
Sleep(5000);
goto Start;
}