Recent content by Absolutism

  1. A

    Find the Current and potential difference in a parallel/series circuit

    Okay. Thank you so much. I'll continue it now. I thought I was making stuff up at some point!
  2. A

    Find the Current and potential difference in a parallel/series circuit

    Homework Statement Okay. I got two different answers for these and I don't know which one is right so I could continue from there. If you will please help by letting me know which answer is right and why, I'd very much appreciate it. This is the figure...
  3. A

    Comp Sci 90 degree rotation of a 2D array in c++

    The program looks quite messy L: However, the part in bold is the matrix rotation part. #include <iostream> #include <fstream> #include <string> #include <sstream> #include <vector> using namespace std; void rotate90(string a, string b, string c, string d) { string temp =...
  4. A

    Comp Sci 90 degree rotation of a 2D array in c++

    Yes, I tried that and compiled it, but it results in 73 81 62 so, it wouldn't rotate any more
  5. A

    Comp Sci 90 degree rotation of a 2D array in c++

    if I input.. 7 3 6 8 1 2 I get 1 8 7 2 6 3
  6. A

    Comp Sci 90 degree rotation of a 2D array in c++

    yes, it worked for square matrices, but not for rectangular ones for some reason L:
  7. A

    Comp Sci 90 degree rotation of a 2D array in c++

    I didn't get an error, but I guess they won't rotate because they're rectangular?
  8. A

    Comp Sci 90 degree rotation of a 2D array in c++

    Homework Statement I am trying to rotate a 2D array of type string. I am not sure what the problem is with my function. Flipping does occur but for some reason, it's not by 90. Homework Equations The Attempt at a Solution The program consists of a function and the main. Here's...
  9. A

    Comp Sci Transfering data from a text file into a 2D vector array in c++

    Homework Statement I am attempting to transfer the data from a file into a 2D vector array. The data look like this: 1 2 3 4 5 6 7 8 9 However, the dimensions must be detected dynamically. Homework Equations The Attempt at a Solution There are two files in this code, but I attempted to...
  10. A

    Comp Sci C++ User-defined function to calculate the smaller string?

    Homework Statement I came across some codes that calculate the smaller string using user-defined functions. I tried figuring them out, but some parts I don't get. This is the first one: bool isShorter (string& s1, string& s2) { // the string objects may be large! return...
  11. A

    Calculate the angle between the displacement vector and the force vector

    I got 47.121 another time when I did not round, but even that gave me a wrong answer L: I am not sure what's wrong
  12. A

    Calculate the angle between the displacement vector and the force vector

    Homework Statement A force F = 8i-3i N acts on a particle that undergoes a displacement Δr = 2i + j m. (b) What is the angle between F and Δr? (state your answer to three significant figures) Homework Equations Angle = cos-1 (A.B/ AB) The Attempt at a Solution W=13.1 J AB=...
Back
Top