Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Interview-Questions multidimensional arrays
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Jeevan kumar
multidimensional arrays
1 Answer(s)      4 years and a month ago
Posted in : JSP-Interview Questions


Write a javascript code for inputting numbers and displaying that using multidimensional arrrays.


Advertisement
View Answers

October 29, 2010 at 4:57 PM


Hello Friend,

Try this:

<script>
           function multidimensionalArray(array) {
                    for(var x=0; x<3; x++) {
                    for(var y=0; y<3; y++){
                    document.write(array[x][y]+" ");
                    }
                    document.write("<br>");
                }
            }
            var array1 = new Array();
            for(var i=0;i<3;i++){
            var input=window.prompt("Enter Elements for array1: ");
            array1[i]=input;
            }

            var  array2 = new Array();
            for(var i=0;i<3;i++){
            var input=window.prompt("Enter Elements for array2: ");
            array2[i]=input;
            }

            var  array3 = new Array();
            for(var i=0;i<3;i++){
            var input=window.prompt("Enter Elements for array3: ");
            array3[i]=input;
            }

            var array = new Array(array1,array2,array3);
            multidimensionalArray(array);
</script>

Thanks



Related Tutorials/Questions & Answers:
multidimensional arrays
multidimensional arrays  Write a javascript code for inputting numbers and displaying that using multidimensional arrrays.   Hello Friend, Try this: <script> function multidimensionalArray(array
arrays
arrays  using arrays in methods   Java use arrays in methods import java.util.*; class ArrayExample{ public static int getMaxValue(int[] arr){ int maxValue = arr[0]; for(int i=1;i < arr.length;i
Advertisements
arrays
Store a table with students and information (name, ID, password, crypted password, etc) in a multi-dimensional array "stud"  Arrays and Strings: Store a table with students and information (name, ID, password, crypted password
Multidimensional Array in PHP - PHP
Multidimensional Array in PHP  The concept of Multidimensional Array in PHP completely goes over my head. Can any one present a better explanation on it with an example? Also the structure of Multidimensional Array in PHP. 
Arrays
Arrays   Hi I need help with the following exercises. Exercise 1: Write a Java application in which the user is prompted for the total number of integer values to be stored in an array. Initialize the array with random values
JavaScript array multidimensional
the arrays object as parameter. Finally a new multidimensional table is created... JavaScript array multidimensional In this Tutorial we want to describe you a code that help you in understanding JavaScript array multidimensional
MultiDimensional Array - Java Beginners
MultiDimensional Array  Hello Sir, How i can display Multiplication Table of 1 to 10 by Using Multidimensional Array in java  Hi Friend, Try the following code: public class MultiplicationTable{ public static
java multidimensional array - Java Beginners
java multidimensional array  i have two arrays which will take numbers and no. of rows and columns fron method getArr() ifter that i want to ensure when no. of rows of first array = no. of rows of second matrix (and columns also
multidimensional data cube - Java Beginners
multidimensional data cube  how to create multidimensional data cube in java  Hi friend, A data warehouse comprises a multidimensional data storage area to store multidimensional data and a transactional data
how to store jtable value in multidimensional array?
how to store jtable value in multidimensional array?   i want to store the value of jtable in multidimensional array,with type double. how to store jtable value in multidimensional array
how to store jtable value in multidimensional array?
how to store jtable value in multidimensional array?   i want to store the value of jtable in multidimensional array,with type double. how to store jtable value in multidimensional array
JavaScript array multidimensional
JavaScript array multidimensional   ... that help you in understanding JavaScript array multidimensional. For this we are using JavaScript language, This code illustrate a multidimensional array
Php Array Multidimensional
In the Multidimensional array, elements of the array are itself array Multidimensional array can be two dimensional or multidimensional array PHP Multidimensional Array Example <?php     $nature=array
Arrays in java
Arrays in java  what is param array in java
Multidimensional Array Java
;TITLE>Multidimensional Arrays in Jsp</TITLE> </HEAD> <...;Multidimensional Arrays in Jsp</FONT> <% int TwoArray[][] = new int[7...Multidimensional Array Java     
java arrays
java arrays  i need a java program to store student details like id,name,addr,marks,average,total..using arrays..input data using scanner class and by using class, object and constructor
java arrays
java arrays  can i know how can we intilize the three dimentional arrays in java? and how can we assign thae values to that array
Java with Arrays
Java with Arrays  I was given the assignment to create two parallel arrays; both of size 50 (declares 50 as a constant) One is an array of strings... and store it in the arrays. The input for the problem should be provided in a text
Advertisements
 

 

 

DMCA.com