Fandom

Scratchpad

Ie/Informatyka/Palindrom

< Ie | Informatyka

215,672pages on
this wiki
Add New Page
Discuss this page0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Program dla wczytanej liczby wypisze "1", jeśli jest palindromem, a "0", jeśli nim nie jest.

    load  =0
    store 3
    read  0
    store 1
    store 2
    div   =10
    jzero tak
et2:load  2
    div   =10
    mult  =-10
    add   2
    add   3
    store 3
    load  2
    div   =10
    jzero et1
    store 2
    load  3
    mult  =10
    store 3
    jump  et2
et1:load  1
    sub   3
    jzero tak
    write =0
    halt  
tak:write =1
    halt

Also on Fandom

Random wikia