Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Trójkąta</title>
- <meta charset="UTF-8">
- <!--link rel="stylesheet" href="style.css"-->
- <style>
- body{
- display:flex;
- align-items:center;
- justify-content:center;
- font-family:Arial;
- }
- </style>
- </head>
- <body>
- <div>
- <h1>Sample Text</h1>
- </div>
- <script>
- let x = prompt("Wprowadź x", 0),
- y = prompt("Wprowadź y", 0);
- const h = document.querySelector("h1");
- function comp(a, b){
- for(let i = a-1; i>0; i--){
- if(a%i==0 && b%i==0){
- return i;
- }
- }
- }
- comp(x, y);
- let nww = (x*y)/comp(x, y);
- h.innerHTML = nww;
- </script>
- </body>
- </html>
- Mr. Kaminsky
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement