Jump to content



Photo
- - - - -

How To Define A 2d Array?


  • Please log in to reply
1 reply to this topic

#1 kavehmj

kavehmj

    Newbie

  • Members
  • Pip
  • 2 posts

  • Calculators:
    CP 330

Posted 30 December 2011 - 08:31 PM

Hi
I know how to define a 1D Array in classpad at it's programming area. But i don't know how to define a 2D Array in classpad 330. For example how can i define a 2D array I (which has written in C++ like bellow) in classpad???

int matrix[5,5]
for (int i=0;i<5;i++){
for (int j=0;j<5;j++){
cin>>matrix[i][j];}}

#2 pedram

pedram

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 02 January 2015 - 01:37 PM

What do you want?

Fill(0,5,5)=>matrix1
For 1=>i To 5 Step 1
For 1=>j To 5 Step1
Input Matrix1[i,j],"enter array volume...","enter..."
Next
Next

____________Or____________

Fill(0,n,m)=>matrix1
____________Or____________
Fill(matrix2,n)=>list1
___________Or______________
Fill(list2,n,m)=>matrix2
____________Or____________
Fill(matrix3,n,m)=>matrix4

Edited by pedram, 11 January 2015 - 08:41 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users