Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const A = prompt('Podaj Podaj liczbę A:') * 1;
- const B = prompt('Podaj Podaj liczbę B:') * 1;
- const C = prompt('Podaj Podaj liczbę C:') * 1;
- const D = prompt('Podaj Podaj liczbę D:') * 1;
- const E = prompt('Podaj Podaj liczbę E:') * 1;
- let sr = (a, b, c, d, e) => {
- let suma = (a+b+c+d+e);
- let srednia = suma/5;
- return srednia;
- }
- let min = (...args) => {
- let minimum =Math.min(...args);
- return minimum;
- }
- let max = (...args) => {
- let maximum = Math.max(...args);
- return maximum;
- }
- document.write(`Średnia wynosi: ${sr(A, B, C, D, E)}<br>`);
- document.write(`Najmniejsza warość wynosi: ${min(A, B, C, D, E)}<br>`);
- document.write(`Największa wartość wynosi: ${max(A, B, C, D, E)}<br>`);
Advertisement
Add Comment
Please, Sign In to add comment