that i need help onQuestion: What is the shortest possible Fortran programI was thinkingProgram "_____"Print "_____"Endhalp!!
6/1/2010 10:01:27 PM
you don't need the print, but you do need a stop, n'est-ce pas?
6/2/2010 1:33:53 AM
How come? When i run a program with the same format as above and leave out the STOP, it acts the same as if the word STOP was in the program
6/2/2010 6:05:22 AM
Is this a CS question, like, write a the shortest possible program (in bits) or is it just a pedagogical question?Does it count as a program if if just makes an assignment?PROGRAM za=1END
6/2/2010 9:34:11 AM
^You'd have to declare a in that caseI don't think you would actually even need anything in the body.Program XEndProgram X
6/2/2010 10:14:42 AM
you should declare the variable, at least for writing in fortran77. I think in f95 too you can manage to not declare variables.But Wraith is probably right about the short program having no body:
6/2/2010 12:15:49 PM
The answer, for Rodman's class, is in his notes which are online.http://courses.ncsu.edu/csc112/lec/051/Select Lecture Notes 0 - Intro-----Let’s return to step 5, implementation. Here is how I write Fortran programs. First I name the program: Area_of_a_triangle.Then I write three lines of code that I know will compile plus comment.PROGRAM Area_of_a_triangle! Documentation – follow guidelines in labIMPLICIT NONEEND PROGRAM Area_of_a_triangle-----Since ^ did it in two lines, I asked Rodman and his response was ....two lines is the minimum but he requires all programs for his classto have the two middle lines.
6/2/2010 3:12:56 PM
i had rodmans class.PROGRAM fuckrodmanIMPLICIT NONEEND PROGRAM fuckrodman
6/2/2010 9:33:53 PM
lolI'm AstralAdvent and i approved this message.
6/2/2010 11:03:41 PM
YOU LAUGHING AT ME????anyways...Thanks for the help everyone
6/3/2010 7:30:59 PM