begin var a:=ReadInteger('Введите a от 1 до 30:'); if a<1 then begin Writeln('Неверно'); Exit end; var b:=ReadInteger('Введите b от '+a.ToString+' до 30:'); if (b<a) or (b>30) then begin Writeln('Неверно'); Exit end; var P:=ArrFill(30,0); for var i:=a-1 to b-1 do P[i]:=2; P.Println end.
Пример Введите a от 1 до 30: 2 Введите b от 2 до 30: 10 0 2 2 2 2 2 2 2 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#include <iostream>
using namespace std;
int main()
{
int a;
cin>>a;
a = (a - (a/100)*100) * 10 + a/100;
cout<<a<<endl;
system("PAUSE");
}