Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function rd3(a, b, c) {
- return Math.round((c * b) / a);
- }
- let a = parseInt(prompt("Establezca el número 'a':"));
- let b = parseInt(prompt("Establezca el número 'b':"));
- let c = parseInt(prompt("Establezca el número 'c':"));
- console.log(`La regla de 3 con los siguientes datos introducidos anteriormente, dado que 'a' = ${a}, 'b' = ${b} y 'c' = ${c} es igual a ${rd3(a, b, c)}`);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement