MarcinKrol

Zad 8 - JS

Nov 24th, 2020
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. const l1 = prompt('podaj liczbę a sprawdzę czy jest parzysta') * 1;
  2.  
  3. if (l1%2==0){
  4. document.write(`${l1} jest liczbą parzystą`);
  5. console.log(`${l1} jest liczbą parzystą`);
  6. }
  7. else{
  8. document.write(`${l1} jest liczbą nieparzystą`);
  9. console.log(`${l1} jest liczbą nieparzystą`);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment