Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Love Calculator Practice by Saidur Rahman Setu (@srsetu)
- // Names
- var firstName = prompt("What is your Name?");
- var secondName = prompt("What is partner Name?");
- //Calculation
- var n = Math.random();
- n = n * 100;
- n = Math.floor(n) + 1;
- //Result in alert box
- alert(firstName + " and " + secondName +"'s love percentage is: " + n + "%");
Advertisement
Add Comment
Please, Sign In to add comment