Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function z3(){
- let kg = 0
- let i = 0
- while(kg<=200){
- a = parseInt(prompt("Jaką wagę ma paczka?: "))
- kg += a;
- i++;
- }
- if(kg>=200){
- document.write("Waga twoich ")
- document.write(i)
- document.write(" paczek wynosi: ")
- document.write(kg)
- document.write(" ,co przekroczyło dopuszczalny limit")
- }
- }
- function z4(){
- let a = parseInt(prompt("Podaj a"));
- let b = parseInt(prompt("Podaj b"));
- let pom = 0;
- while (a != b) {
- if (a < b) {
- pom = a; a = b; b = pom;
- }
- a = a - b;
- }
- document.write("NWD: ");
- document.write(a);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement