Recent content by NDiggity

  1. N

    Calculating Energy Released in Fusion Reactions and Comparing to Gasoline

    Homework Statement Two deuterium nuclei (deuterium= 2.014102u) combine thru fusion to form a tritium nucleus (mass 3.016050u) and a proton. 2. Attempt at solution Two parts to this problem: a) Calculate the energy released in one fusion reaction (in MeV). So for this I went [(initial...
  2. N

    Calculating Average Speed to Catch a Ball Thrown from a Building

    Ahh, so since I was using up as positive, displacement would be -32.35 since the ball is going down. Thank you both so much!
  3. N

    Calculating Average Speed to Catch a Ball Thrown from a Building

    Homework Statement A guy on the top of a 25m building throws a ball upwards with a initial vel of 12 m/s. A guy 31 m from the building catches it at the bottom of the building. What must be the average speed of the guy to catch it at the bottom. Homework Equations Using the Kinematics...
  4. N

    Help Reading A .txt File Into A 2D Array In C

    Yes, I did fix the feof function. I ran it once and got an infinite loop before realizing that! Thanks for your help.
  5. N

    Help Reading A .txt File Into A 2D Array In C

    I figured out my problem. I forgot the ampersand in front of the array in the fscanf function.
  6. N

    Help Reading A .txt File Into A 2D Array In C

    I allocated the array but then I need to fill it with the values contained in the file which is the step I'm having trouble with. Here is the loop I made and then assigning the array the values contained in the file, except I want to skip that very first number in the file, which I don't know...
  7. N

    Help Reading A .txt File Into A 2D Array In C

    Homework Statement The program is to read in a file full of numbers formatted like this: The first line contains a single int n. Following this line, there will be n lines with n ints each separated by whitespace. So I have asked the user for a file path and read in the first number ('n')...
  8. N

    How Can You Correctly Read and Format File Data in C?

    Homework Statement Ok, here is the other question that's giving me a headache. There is a file which holds 5 data items per line and a minimum of 1 line. The data is always in the order float float integer float string and each element is separated by a space. So we need to ask the user for...
  9. N

    Help With String Manipulation In C

    Ok, I figured out my problem and I still was able to use the strstr function because our teacher wants us to use one of the string functions. Thanks for the idea, i incorporated it. Sometimes the simplest way is the best! Thanks.
  10. N

    Help With String Manipulation In C

    Homework Statement I need to write a function which will replace any occurence of "cmpt" with "XXXX" in a string. The Attempt at a Solution I am still confused with pointers and string manipulations. Here is what I have so far but I'm lost. http://rafb.net/p/2h8fJ210.html
  11. N

    Finding the Constant in an Anti-Derivative Function

    Thank you so much for explaining that to me, now I can go write my Math 110 final...yay?
  12. N

    Finding the Constant in an Anti-Derivative Function

    Do I go 1=1/4(-1)^4 + C and solve for C?
  13. N

    Finding the Constant in an Anti-Derivative Function

    Here is the question: Find a function f which satisfies both of the following properties: f ' (x) = x^3 The line x + y = 0 is tangent to the graph of f. I figured out that f(x) is 1/4x^4 + C. Now I don't know what to do. I know I need to figure out C but I'm stuck. I isolated x+y=0 for y...
  14. N

    Help With Assigning An Array With rand()

    Wow, dumb mistake :p. Thank you very much for taking the time to look at my code, I appreciate it. All is good now, thanks again!
Back
Top