Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: frtran90
  • Order by date
  1. frtran90

    Class Project

    I am studying business but the I heard the class was really easy so I took it. Extremely mistaken.
  2. frtran90

    Class Project

    sorry, forgot to take out the &... real:: testx !now to input and figure out f(x) write(*,*) 'Enter real number for X ' read(*,*) testx write(*,*) 'Solving for F(X)...' do i=1, nr_elements read(1,*) x(i), y(i) if(x(i) < testx < x(i+1)) then write(*,*) 'Y = ', y(i) = (y(i+1) - y(i)) /...
  3. frtran90

    Class Project

    This is what i have.. but it doesn't work, theres an error in the if statement real:: testx !now to input and figure out f(x) write(*,*) 'Enter real number for X ' read(*,*) testx write(*,*) 'Solving for F(X)...' do i=1, nr_elements read(1,*) x(i), y(i) if(x(i) < testx < x(i+1)) then...
  4. frtran90

    Class Project

    @ gullipe: how did you figure that out? @ mikrom: thanks, that makes a lot of sense. the last thing i cannot figure out is how to code this part in: (If the value is out of range, print a message.) Test your program with the following x-values: -7.8, 1.1234, 13.65, 22.5, 23.5914, 25, 25.085...
  5. frtran90

    Class Project

    i think your equation is close, but my teacher told us to use this one: (yes i know that f(x) is the same thing as y) f(x) = f(i) +[f(i+1)-f(i)] / [x(i+1)-x(i)] * (xo -xi) xo is the value to be input by the user i guess. I've gotten some of the program written out already but this is one of...
  6. frtran90

    Class Project

    Thanks. Hopefully I can figure things out from there!
  7. frtran90

    Class Project

    Hey guys. I've been assigned this project for my intro to fortran90 class and I have no idea where to begin. Could someone give me a sample code for it? The following data represents discrete values of a function for which an explicit formula is not known: 1.123400 167.5600...
  8. frtran90

    Truncated Infinite Series

    trying to write a program that will do a truncated infinite series to calculate the sin of x. I need the do loop to end when the term is within the user input for accuracy. anybody know how i can finish it? i've got this so far. Program sinx Implicit none !declare variables real::x, sum...
  9. frtran90

    Counting letters in a given sentence

    hi mikrom, that program works, but i'm not sure i understand it exactly. is there any way you could add something to my code to make it print the number of times the letter appears?
  10. frtran90

    Counting letters in a given sentence

    program countletter implicit none integer::i,j integer::numberoftimes character::letter character::letter1 character(len=30)::sentence = "I don't know how to do it." write(*,*)'Enter a letter' read(*,*)letter write(*,*)"You chose the letter '",letter, "' and the number of times it appear$...
  11. frtran90

    Counting letters in a given sentence

    I'm trying to create a program that assigns a sentence to a given character variable, prompts the user to input a letter, and then outputs how many times that letter is in the assigned sentence. I'm trying to do this with a simple do loop.. completely stuck. could anyone show me a code that...

Part and Inventory Search

Back
Top