#include <iostream>
using namespace std;
int main()
{
int A,B,C;
cout<<"Input A: "<<endl;
cin>>A;
cout<<"Input B: "<<endl;
cin>>B;
cout<<"Input C: "<<endl;
cin>>C;
if(A>0||B>0||C>0)
cout<<"An optional item is present"<<endl;
else
cout<<"There is no additional item"<<endl;
return 0;
}
Var
a1, a2: integer;
begin
a1 := 0;
a2 := 0;
writeln('enter the first value: ');
read(a1);
writeln('enter the second value: ');
read(a2);
writeln('answer is: ', a1+a2);
end.
I: integer;
a: array [0..100] of integer;
b: array [0..100] of integer;
for i:=0 to 100 do begin
if A[i]<0 them b[i]:=0
else b[i]:=1;
end;
Var v:real;
begin
Write('Введите v, v>20,v<200: ');
Readln(v);
while (v<=20)or(v>=220) do
begin
Write('Введите v, v>20,v<200: ');
Readln(v);
end;
writeln('v = ',v);
end.
Пример:
<span>Введите v, v>20,v<200: 15
Введите v, v>20,v<200: 550
Введите v, v>20,v<200: 150
v = 150</span>
Const
c1='Математический анализ';
c2='Алгебра и геометрия';
c3='Информатика';
c4='История';
c5='Философия';
var
o: text;
begin
AssignFile(o, 'Output.dat');
Rewrite(o);
write(o,c1,'|',c2,'|',c3,'|',c4,'|',c5);
CloseFile(o)
end.