- 1
It doesn't works fine why?!?
<script> var num=[[],[]]; var i,j; rs=prompt("enter row size"); cs=prompt("enter column size"); for(i=0;i<rs;i++) { for(j=0;j<cs;j++) { num[[i],[j]]=parseInt(prompt([[i],[j]])); } } document.write("the given nos are","<br>"); for(i=0;i<rs;i++) { for(j=0;j<cs;j++) { document.write("\t",num[[i],[j]]); // document.write("\t"); }
4 Respuestas
+ 1
https://www.sololearn.com/Codes/
^Post your full code there and give us link. That way we can see all of the code (your post was cut off due to character limitations), any errors, and properly fix it then link it back to you.
Do that and we'll be more than happy to assist you!
0
If it is used after an HTML document is fully loaded, it will delete all existing HTML.
Tip: The document.writeln() method is similar to write(), only it adds a newline character after each statement.
0
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
</body>
<script type="text/javascript">
var num=[[],[]];
var i,j;
rs=prompt("enter row size");
cs=prompt("enter column size");
for(i=0;i<rs;i++)
{
for(j=0;j<cs;j++)
{
num[[i],[j]]=parseInt(prompt([[i],[j]]));
}
}
document.write("the given nos are","<br>");
for(i=0;i<rs;i++)
{
for(j=0;j<cs;j++)
{
document.write("\t",num[[i],[j]]);
// document.write("\t");
}
//document.write("\t");
document.write("<br>");
}
</script>
</html>
//here is the full code
0
if am giving row size:3
and column size:3
sample input:
1 2 3
4 5 6
7 8 9
I am getting output as follows
output:
7 8 9
7 8 9
7 8 9
//this is my question....@jakob