Python | C |
---|---|
$\begin{aligned} & \mathrm{x~=~int(input())} \\ & \text{while x }!=9\text{:} \\ & \qquad \begin{aligned} & \text{if x \% 3}==0\text{:} \\ & \qquad \mathrm{x~=~x**2} \\ & \text{else:} \\ & \qquad \mathrm{x~=~x~*~3} \end{aligned} \end{aligned}$ | $\begin{aligned} & \mathrm{int~x;} \\ & \mathrm{scanf(}\text{"\%d"}\mathrm{,~\&x);} \\ & \text{while~(x~}!=~9\text{)} \\ & \qquad \begin{aligned} & \text{if~(x~\%~3~}==~0\text{)} \\ & \qquad \mathrm{x~=~pow(x,~2);} \\ & \text{else} \\ & \qquad \mathrm{x~=~x~*~3;} \end{aligned} \end{aligned}$ |
Isprobaj potpuno besplatno!
Registracijom dobivaš besplatan*
pristup dijelu lekcija za svaki predmet.