Advertisement
Guest User

Untitled

a guest
Feb 18th, 2020
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.71 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <meta charset="utf-8">
  5.     </head>
  6.     <body>
  7.         <script>
  8.             //4.2
  9.             function resi(broj, a){
  10.                 var obrnatbroj = 0;
  11.                 while(broj!=0){
  12.                     obrnatbroj = obrnatbroj*10 + (broj%10);
  13.                     broj = broj/10;
  14.                 }
  15.                 while(obrnatbroj<10000){
  16.                    obrnatbroj = obrnatbroj*10;
  17.                }
  18.                obrnatbroj = obrnatbroj/10;
  19.                for (i=0; i<a; i++){
  20.                    obrnatbroj = obrnatbroj/10;
  21.                }
  22.                return obrnatbroj%10;
  23.            }
  24.            
  25.        </script>
  26.     </body>
  27. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement