/* c++ */
#include <iostream>
using namespace std;
int main()
{
int A, B;
cout << "Enter the numbers A and B" << endl;
cout << "A: ";
cin >> A;
cout << "B: ";
cin >> B;
while (A > 100)
{
cout << "The numbers more than 100" << endl;
cout << "Enter again" << endl;
cout << "A: ";
cin >> A;
cout << "B: ";
cin>> B;
}
if (A == B)
cout << "ровно" << endl;
else if (A > B)
cout << "больше" << endl;
else
cout << "меньше" << endl;
return 0;
}
1)
var a,b:longint;
begin
readln(a,b);
writeln(a+b);
end.
2)
var x:longint;
begin
readln(x);
if(x>0) then writeln(x-6) else if(x=0) then writeln(32*x-7) else if(x<0) then writeln(5*x-2);
end.
3) В третьей условие не совсем понял, если что, дополни, отредактирую код. Какие значения принимают элементы (по какому принципу заполняется массив)? Написал для массива с элементами от 1 до 50.
var a:array[1..50] of integer;
var i:integer;
begin
for i:=1 to 50 do a[i]:=i;
for i:=1 to 50 do writeln(a[i]);
end.