- 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"); }

30th Mar 2018, 4:50 PM
Code_Magician❤
Code_Magician❤ - avatar
4 Antworten
+ 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!
30th Mar 2018, 4:54 PM
Fata1 Err0r
Fata1 Err0r - avatar
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.
30th Mar 2018, 6:05 PM
Damyan Petkov
Damyan Petkov - avatar
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
31st Mar 2018, 5:11 AM
Code_Magician❤
Code_Magician❤ - avatar
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
31st Mar 2018, 5:13 AM
Code_Magician❤
Code_Magician❤ - avatar