hmmm got it to stop making too many errors, but now I get a segmentation fault?
program dlink
c Matt Smith
c CS450
c Sine Fortran Doubly Linked List Assignment 1
c23456789
integer nmax
real sData(10000)
real cData(10000)
integer prev(10000)
integer next(10000)...
welp im back. got my C++ code of the same thing working perfectly.
program dlink
c Matt Smith
c CS450
c Sine Fortran Doubly Linked List Assignment 1
c23456789
integer nmax
real sData(10000)
real cData(10000)
write(*,*), 'Input n for Number of sin Computations'...
haha no clue.
he's old and did all this stuff when he was younger.
but I mean the assignment was how he gave it (dont ask me why)
i ended up getting it to work in C++
it prints out the next/prev arrays showing the correct index's
just gotta sort through them and convert to fortran. if I have...
wow thanks a ton mikron! u have to remember this is my first stab at fortran.
now I need to figure out some way to order these using a doubly linked list with arrays.
I for sure will have 3 arrays (prev/next/data)
I know sorta how it works on paper....but the logic is a little screwy. anyone...
crap modula didnt work
this code does work using 1 and n-1
program dlink
c Matt Smith
c CS450
c sDatae Fortran Doubly Linked List Assignment 1
c23456789
real n
real sDatae,cDatae,sDatae1,cDatae1
real sData(10000)
real cData(10000)
write(*,*), 'Input n for Number...
ok i got sine/cos arrays working (they dont print right but I checked the numbers they are correct (using print sData(15) etc..)
program dlink
c Matt Smith
c CS450
c sDatae Fortran Doubly Linked List Assignment 1
c23456789
real n
real sDatae,cDatae,sDatae1,cDatae1
real...
Well I tried populating the sin/cos array (to store) with this. but I keep getting an error about the DO statement ending with an integer?
program dlink
c Matt Smith
c CS450
c sDatae Fortran Doubly Linked List Assignment 1
c23456789
real n
real...
Ya I think what you were saying is right. he said we have to use g77.
and said we'd prolly need 3 arrays to represent pointers. It makes more sense now that I read what you said.
all these diff fortran types are confusing you know lol especially when you've never sued fortran before ever in...
hmmm ok that makes sense.
I think we can do either tbh, i guess doing an array would be easier.
So would this be a good plan:
-->Read in n
:loop till n computing sine of n
in loop insert each into an array
:finish loop after n
start at tail of loop:
print n
go back n-1: till head is reached...
I was given an assignment for class (new class just started a week ago) for fortran.
I've done some reading on fortran and get the general syntax but had a question of what the "best" way to go about this would be.
here's the inquery:
"Write a program in Fortran that (1) reads in an integer n...
So Im completely new to prolog (i know I know lol)
and my AI class is doing a prolog genealogy (sp) assignment
http://cs.uky.edu/~goldsmit/463/p5.html
I understand the basics like building the facts database and such but...the scripts? Im not sure of.
Like how would you represent a nth...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.