Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>uyhvjbl</title>
- <meta charset="utf-8">
- <script type="text/javascript">
- var zzx=new Array();
- function podaj()
- {
- var ilosc=prompt("Podaj ilosc liczb");
- for(var i=0; i<ilosc; i++)
- zzx[i]=parseInt(prompt("Podaj ilość liczb"));
- }
- function wypisz()
- {
- document.write("Podane liczby: ");
- for(var i=0; i<zzx.length; i++)
- document.write(zzx[i]+" ");
- }
- function przelicz()
- {
- document.write("<br>Przeliczone liczby:<br>");
- for (var i=0; i<zzx.length; i++)
- if ((zzx[i]%2)==0)
- {
- var x=(zzx[i]+128);
- document.write(x+", ");
- }
- else
- {
- document.write(zzx[i]+", ");
- }
- }
- podaj();
- wypisz();
- przelicz();
- </script>
- </head>
- <body>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement