program n1; uses crt; var a,b,c,x: integer; beginclrscr; writeln('vvedite chislo'); readln(x); a: =x div 100; c: =x mod 10 ; b: =x div 10 mod 10; if a=0 then writeln('chislo ne trehznachnoe! ') else writeln(c,b,a); readlnend.
2) или через string
program n1; uses crt; var a: string; beginclrscr; writeln('vvedite chislo'); readln(a); if length(a)> 3 then writeln('oshibka') elsewriteln(a[3],a[2],a[1]); readlnend.
Популярные вопросы