Recent content by Clint_Johnson

  1. C

    Help with C Homework: Array from 1D to 2D for 9 Cell Average

    Sorry, should have specified. Everyone, at least to my knowledge, says C is the easiest for scientific programming due to its small nature and the fact that you can do almost anything with it. But you are right about the Fortran bit and the python for that matter. I started toying around with...
  2. C

    Help with C Homework: Array from 1D to 2D for 9 Cell Average

    Part of the purpose of the assignment was to allocate array memory arbitrarily so that you could potentially input any array into the final program. But yeah I will go ahead and restart. Everyone says C is the easiest programming language but honestly I find Fortran to be more understandable and...
  3. C

    Help with C Homework: Array from 1D to 2D for 9 Cell Average

    dataArray was supposed to be the 2D array I was to create imax is to be used later (this is a smaller part of a larger assignment) same with jmax r was to stand for row c for column I got r and c idea from http://www.daniweb.com/forums/thread172619.html# dimensions, I...
  4. C

    Help with C Homework: Array from 1D to 2D for 9 Cell Average

    Here's it with comments, took out a imax, jmax, they are for use later. File Edit Options Buffers Tools C Help #include <stdio.h> #include <stdlib.h> int main() { int dataArray[2]; /*trying to compile...
  5. C

    Help with C Homework: Array from 1D to 2D for 9 Cell Average

    Whoops I accidentally forgot to edit the "if' out. Well the first line of the binary file is two integers representing the number of rows and columns, the rest of the lines are data values, one per line. It compiles fine up until I try to create the 2D array, which is were I hit my road...
  6. C

    Help with C Homework: Array from 1D to 2D for 9 Cell Average

    Homework Statement Need to write a 1 dimensional array in 2D so I can do operations on a 9 cell average. Here's what I've got so far #include <stdio.h> #include <stdlib.h> int main() { int dataArray[2]; int imax, jmax; FILE *fp; char buffer[4]; int...
Back
Top