Recent content by charmedbeauty

  1. C

    Segmentation Fault 11 in Flipifneeded Function

    Homework Statement when I am compiling my code I am getting a segmentation fault when entering in input but I don't know why? it prints Segmentation fault: 11 Homework Equations The Attempt at a Solution This is my code I tried looking up what was causing it but couldn't...
  2. C

    Help with flipping tokens in 2d array othello/reversi.

    Homework Statement I am trying to flip tokens in my reverse code and I'm a little stuck so far I have a function that checks directions but I don't know how to implement it my code is below. Homework Equations The Attempt at a Solution /reversi.c //Samuel Gilbert...
  3. C

    Update Array Elements from User Input | How-To Guide for Homework Assignments

    Homework Statement I have a simple 8X8 array with initial conditions. how would I go about updating the an element of this array from user input? Homework Equations The Attempt at a Solution for(i=0;i<MAX_SIZE;i++){ 24 putchar(i+'1'); 25 putchar('|'); 26...
  4. C

    Using getchar, cant change variable?

    thanks will use next time I think that's what I want though... I am trying to program a game called reversi and I have a [8][8] array. The user does not input numeric co-od's though ie instead of [0][0] the user input a1 which is meant to be the element of the array [0][0]. thats why I...
  5. C

    Using getchar, cant change variable?

    Homework Statement I have some code and I use getchar to read in some input from the user say a5 I have assigned char letter; int number; letter = getchar(); number = getchar(); so that putchar(letter) prints a and putchar(number) prints 5 but when I try ...
  6. C

    Partial Fraction Decomposition for ∫18/((x2+9)(x-3))

    Homework Statement Find ∫18/((x2+9)(x-3)) Homework Equations The Attempt at a Solution Im a little stuck on this. 18∫1/((x2+9)(x-3)) Im not sure how to turn this into a partial fraction.. help. Thanks
  7. C

    Phase Diff. of 600 nm Light in Medium w/ Ref. Index 1.5

    path length= actual length × (refractive index) → pathlength/wavelength. = λ wavelengths ??
  8. C

    Phase Diff. of 600 nm Light in Medium w/ Ref. Index 1.5

    Homework Statement Light of free space wavelength 600 nm (6000 Å) travels 1.6 10 -6 m in a medium of index of refraction 1.5. Find: 1. the optical path length, [This is the physical path length x refractive index.] 2. the wavelength in the medium, and 3. the phase difference...
  9. C

    Reverse String: Fixing Compiling Warning

    Write a function void tnirp(char s[]); which takes a string s as a parameter and prints the characters of s in reverse order. Only characters up to the first '\0' or the first '\n' should be included, and a newline character '\n' should be printed at the end. Place the code for this...
  10. C

    Reverse String: Fixing Compiling Warning

    Ok so If I have tnirp() at the start of the code ie #include <stdio.h> #include <string.h> #define MAX_LENGTH 20 int main(int argc, char * argv[]){ tnirp() char s[MAX_LENGTH]; but that does not fix it ,,, I have to submit this in an hour so I really need help thanks.
  11. C

    Reverse String: Fixing Compiling Warning

    Homework Statement I am trying to write up code to reverse the order of a string i.e. input: and output: dna For some reason I am getting this compiling warning but I don't know what's wrong with my code... Homework Equations The Attempt at a Solution #include...
  12. C

    Having trouble explaining this phenomena

    the coils were placed on top of each other so the length of the coil (x) is now 2x. then we dropped the magnet through them so at some point I guess the magnet could have been in both coils at the same time since the length of the magnet was ≈x/2. does this make sense. ??
Back
Top