7. program n7;
var a: real;
begin
writeln ('Введите число');
readln (a);
if (a>-10) and (a<10) then
a:= a + 5
else
a:= a-10;
writeln (a);
end.
8. program n8;
if (a>100) and (a<-100) then
a:=0
a:= a+1;
9. program n9;
if (a>=2) and (a<=5) then
a:= a+10
if (a>=7) and (a<=40) then
a:= a-100
if (a<=0) or (a>3000) then
a:= a*3
a:= 0;
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
7. program n7;
var a: real;
begin
writeln ('Введите число');
readln (a);
if (a>-10) and (a<10) then
a:= a + 5
else
a:= a-10;
writeln (a);
end.
8. program n8;
var a: real;
begin
writeln ('Введите число');
readln (a);
if (a>100) and (a<-100) then
a:=0
else
a:= a+1;
writeln (a);
end.
9. program n9;
var a: real;
begin
writeln ('Введите число');
readln (a);
if (a>=2) and (a<=5) then
a:= a+10
else
if (a>=7) and (a<=40) then
a:= a-100
else
if (a<=0) or (a>3000) then
a:= a*3
else
a:= 0;
writeln (a);
end.