how to declare and use multidimensional arrays in fortran 77?
930134
Multi-Dimensional arrays are declared in FORTRAN by the following syntax :\ntype VARIABLE (index1, index2, index3....)\n\nwhere 'type' is the data type and VARIABLE is the multi-dimensional array variable name\nindex1, index,2 index3..are array elements...\n\nExample\nINTEGER MARK(5,100)\nThis is a two dimensional array.\n\nUsage:\n-------\nthe array can be set with values as follows\nMARK(1,1)=75\nor the array can be equated to a non-dimensional variable like\nA=MARK(1,1)
450434
I stopped using Fortran some 25 years ago... For goodness sake, I'm glad to see someone still using it!\n\nG95 seems to be a project for Open Source Fortran. No idea how good it is, but check out this one:\n\nhttp://www.g95.org/\n\nIntel has a webpage with Fortran compiler and libraries for Linux: \n\nhttp://www.intel.com/cd/software/products/asmo-na/eng/219771.htm\n\nIntel Visual Fortran (commercial)\n\nhttp://www.intel.com/cd/software/products/asmo-na/eng/compilers/219759.htm
604143
here is a program for 10 numbers in ascending order\n\n#include <iostream.h>\n#include <conio.h>\n\nvoid main()\n{\nclrscr();\nint array[10],t;\nfor(int x=0;x<10;x++)\n{\ncout << "Enter Integer No. " << x+1 << " : " << endl;\ncin>>array[x];\n}\nfor (x=0;x<10;x++)\n{\nfor(int y=0;y<9;y++)\n{\nif(array[y]>array[y+1])\n{\nt=array[y];\narray[y]=array[y+1];\narray[y+1]=t;\n}\n}\n}\ncout << "Array in ascending order is : ";\nfor (x=0;x<10;x++)\ncout << endl << array[x];\ngetch();\n}\n\nThis program takes in the ten integers array[x] to be stored in the single-dimensional array as a screen input from the user.\nIt then sorts out these ten integers into ascending order and prints them out using the 'cout' command.
765887
Assuming your above program works, which I don't think it will because your doing an aggregate operation on an array..you should assign values to indexes in the array...eg cin >> Date[0] or use a for loop or something...regardless since your putting everything in an array anyway simply do something like using a counter variable, personally i think it would be the easiest way of doing something like that.\n\nint counter = 0;\n\ncout << enter day to subtract << endl;\ncin   >> counter;\ncout << Date[1]  - Date[counter] << endl;\n\nI belive using
670173
you can detailed info abt this at http://www.mae.usu.edu/faculty/bsmith/EFDL/array/Array.html and http://in3.dem.ist.utl.pt/downloads/lxlaser2000/pdf/34_2.pdf
881644
Something like this:\n\nint **myArray;\nint s1,s2,i;\n\nprintf("Input row size: ");\nscanf("%d",&s1);\nprintf("Input column size: ");\nscanf("%d",&s2);\n\nmyArray[0] = malloc(s1*s2*sizeof(int));\nif (myArray[0] != NULL ) {\n  for (i = 0;i<s1,i++) {\n         myArray[i] = (i * s2) + myArray[0];\n  }\n}\n\nmyArray can then be used as normal\n\nmyArray[2][4] = 20;
531852
you have to use instinct, there is no clear rules that states what the expressions must look like (except if the problem insist you on giving the answer in a specific form). \n\nPerhaps one of the guidelines is make variables that have same indices grouped into one. So x + 3x becomes 4x, group them out don't leave them straying.
203290
Change this:\n\nsArray(0)="dog"\n\nTo this:\n\nsArray[0]="dog"
356292
I don't understand your question.  Do you want to write an assembler in Visual Basic?  This sounds like a homework exercise for school.  Secondly, no one knows just what this SIC is.
642129
ok, here is one declaration, of many;\n\nfloat Doc(int arr[100], int NumCt)\n{\nfloat sum = 0.0;\nfor (int i = 0; i < NumCt; i++)\nsum += arr[i];\n\nif (!NumCt)\nreturn sum;\n\nreturn sum / NumCt;\n}
410486
It really depends on which programming language/scripting language you're working with as well as what kind of program you are wanting to write.  I'm guessing that you already know what an array is.  \n\nFor example in JavaScript you would do something like the following:\n \n Declaring arrays:\n \n var arrStudents = new Array()   -- for an empty array\n var arrStudents = new Array(10) -- to declare a certain number of students\n\n  * Always remember that arrays initialize at 0\n\n If you wanted to declare the values of a certain element in an array you would do the following:\n\n arrStudents[0] = Tim\n arrStudents[1] = Bobby ...etc.\n\nArrays can be useful when collecting a large number of responses from a user (such as names, numbers,etc.).  But like I said, it ultimately depends on what kind of a program you are writing.\n\nI provided a website on arrays in the source window below...Good luck on your program.
1011128
Please post the snippet of code that does not work. In general, you need to check an array's length before yo uaccess its elements - it's called defensive programming, and good programmers should employ it.
92611
Use the following syntaxis:\n\nLike *[#]*
578465
The easiest way to do this is to count back from the end of the array.\n\nFor instance, if an array has three values, \n$item[0], $item[1] and $item[2] then you can access the last with:\n$item[-1]... an easy way to reach it!
438919
I dont know how to put this up here. I tried to put it in a nice format, but it would accept.\nBut you put the following in one matrix \n-2  6\n+2  2\n\nThen you put a * (multiply)\n\nThen you put the following in one more matrix\n\nx\ny\n\n\nThen put an ' = ' symbol\n\nThen put the following in a matrix\n\n40\n8
227826
you can use redim function in VB to increase the size of array without loosing any data.it will increase the size of the array and persist your data existed in the array.\nlett me know us satisfied with the ans or need any clarification.
705410
Array is the perfect answer to a problem of declaring too much variables. How so? It's simply because an array represents a set of elements of same data type. Instead of declaring 50 variables using 50 different names, you could just use one name and just add index to it. Take for example a program with 20 variables, i could declare an array consisting of 20 elements and name that array discover. to access the first element of discover i'll just access discover[0] (because the index starts always zero and not 1) and to access the second element, i'll put discover[1], and so on until discover[19]. you could loop this by declaring another variable for the index. say, discover[num], in which num is a variable for the index. you could make this to input the variable :\n for (num=0; num<20; num++)\n{cin>>discover[num]; }\nit is quite simple... all you need is practice...