February 2019 0 10 Report
Czy ktoś wie co zrobic jak podje zakres zliczb ktory wyskakuje w tabeli zeby wyliczono sume i srednia tych liczb?

<html>
<title>str</title>
<head>
<style>
#jeden{
width:100%;
height:25%;
color:white;
background-color:gray;
font-family:Verdana;
font-size:35px;
}
#dwa{
width:40%;
height:75%;
background-color:pink;
font-family:Verdana;
float:left;
}
#trzy{
width:60%;
height:75%;
background-color:aqua;
font-family:Verdana;
float:right;
}

</style>
</head>
<body>
<div id="jeden"><br><br><center>TABELA JS</center></div>
<div id="dwa"></div>
<div id="trzy"><br><center>
<script type="text/javascript">
liczbaa=parseInt(prompt("Podaj dowolną liczbę #1", "liczba #1"));
liczbab=parseInt(prompt("Podaj dowolną liczbę #2", "liczba #2"));
document.write("<table border=\"1\">");
if(liczbaa < liczbab){
for(i=liczbaa; i<liczbab+1; i++){

document.write("<tr><td width=\"50\"><td width=\"400\">" + i +"</tr></td></td> ");
}

}
else if(liczbaa > liczbab){
for(i=liczbaa; i>liczbab-1; i--){
document.write("<td>" + i +"</tr></td> ");
}

}
document.write("</tr>");

document.write("</table>");

</script>

</center></div>
</body>
</html>


More Questions From This User See All

Recommend Questions



Life Enjoy

" Life is not a problem to be solved but a reality to be experienced! "

Get in touch

Social

© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.