Var a:integer;
begin
readln(a);
if a = 1
then write('I');
if a = 2
then write('II');
if a = 3
then write('III');
if a = 4
then write('IV');
if a = 5
then write('V');
if a = 6
then write('VI');
if a = 7
then write('VII');
if a = 8
then write('VIII');
if a = 9
then write('IX');
if a = 10
then write('X');
if a = 11
then write('XI');
if a = 12
then write('XII');
if a = 13
then write('XIII');
if a = 14
then write('XIV');
if a = 15
then write('XV');
end.
Var a,b:integer; l:boolean;
begin
write('a = ');
readln(a);
l:=true;
while (a<>0) do
begin
b:=a;
write('a = ');
readln(a);
if (a<>0)and(a<=b) then l:=false;
end;
writeln(l);
end.
Пример 1:
a = 3
a = 6
a = 9
a = 4
a = 0
False
Пример 2:
a = 3
a = 6
a = 7
a = 0
True
Var i,x,a,b,c,d,count:integer;
begin
count:=0;
for i:=1000 to 9999 do begin
a:=i div 1000;
b:=(i div 100) mod 10;
c:=(i mod 100) div 10;
d:=i mod 10;
if (a<>b) and (a<>c) and (a<>d) and (b<>c) and (b<>d) and (c<>d) then
if (a>b) and (b>c) and (c>d) then begin
count:=count+1;
write(i,' ');
end;
end;
writeln;
writeln('Количество: ',count);
<span>end.</span>
#include <iostream>
using namespace std;
int main()
{
int res=0,a[100],n;
cout<<"Input N"<<endl;
cin>>n;
cout<<"Input elements."<<endl;
for (int i=0;i<n;i++)
cin>>a[i];
for (int i=0;i<n-1;i++)
if (((a[i]>=0) && (a[i+1]<0)) || ((a[i]<0) && (a[i+1]>=0)))
res+=1;
cout<<res;
return 0;
}<span>
</span>
Алг
нач
цел a,b
ввод a,b
вывод "площадь: ",a*b,"; "
вывод "периметр: ",(a+b)*2
кон