Recent content by lcam2

  1. L

    Split Numerical Array of 100 Integer Values 0-99

    Thanks , it is very clear. Im sorry, I am not very good with computers.
  2. L

    Split Numerical Array of 100 Integer Values 0-99

    Can someone help me?? I am really lost
  3. L

    Split Numerical Array of 100 Integer Values 0-99

    Ok, i just wrote this function it does makes a lot of sense to me now. This is my new functions I am not sure if I am returning the correct values. [ int splitUnder ( int A[], int size, int MAX_SIZE ) { int countA, arrA; countA = 0; for (int i=0; i< 99; i++) { while ( A[i] < 49 ) {...
  4. L

    Split Numerical Array of 100 Integer Values 0-99

    Yes, we want to "split" into two arrays. The book doesn't tell the size of the array since the teacher modified the problem and didn't tell us either. can a for loop be used to count the numbers greater than 50 in the main array and make that the array size? I don't expect you to do my...
  5. L

    Split Numerical Array of 100 Integer Values 0-99

    Thanks for you fast reply gb7nash, honestly, I'm new in this field of programming and i didn't get exactly what you mean. when i run the code without the last function it gives me 100 random numbers. When trying to create the split function is the part where i get lost. I understand the part...
  6. L

    Split Numerical Array of 100 Integer Values 0-99

    Homework Statement Define an array with 100 integer values, and fill the array with random numbers in the range from 0-99. Then write a function named split () that reads the array and places numbers from 0-50 and another array that places numbers from 50 to 99. I wrote this code which...
  7. L

    Comp Sci How can I display both miles and kilometers in a table using a C++ function?

    Thank you so much you were very helpful, my code works now. Happy 4th of July :smile:
  8. L

    Euclide's Algorithm to Calculate GCD

    Homework Statement Using Euclid's algorithm write a program with a function that determines and returns the GCD of two integer arguments. This is what i wrote, when i print the remainder is zero, How can i get the last remaninder before the zero value? :confused: Thanks Homework...
  9. L

    Comp Sci How can I display both miles and kilometers in a table using a C++ function?

    1. I am getting 3 columns; Miles from 1 to 10, Kilometers from 1.61 to 16.1, and miles again from 11.5 to 20.5 For the second column of miles i need 11 to 20. I just did what you suggested but i still don't get the second miles column right Thanks for your help and patience. This is...
  10. L

    Comp Sci How can I display both miles and kilometers in a table using a C++ function?

    Im a bit confused, when i run the program i can see the left side columns. But i cannot see right side columns. How do i make the right side miles columns to increment by one. How do i calculate the left side kilometer column? multiplying the split by 1.61? Please help me.
  11. L

    Comp Sci How can I display both miles and kilometers in a table using a C++ function?

    [b]1. write and test a c++ function named MakeMilesKmTable() to display a table of miles converted to kilometers. the argument to the function should be the starting and stopping values of miles and the increment. the output should be a table of miles and their equivalent kilometer values. use...
  12. L

    Calculating the island of Manhattan gains after 400 years.

    According to the legend, the island of Manhattan was purcased from the native indian population in 1626 for 24 dollars. Assuming this money was invested in a Dutch bank paying 5 % simple interest per year, costruct a table in C++ showing how much money the native population would have at the...
  13. L

    Calculating Energy and Power in an Inductive Circuit

    Is someone Willing to help me??
  14. L

    Calculating Energy and Power in an Inductive Circuit

    Homework Statement In a circuit composed of a battery a resistor and an inductor, the EMF from the battery is 12 V and the resistor has a resistance is 7.4 Ω. The inductor consists of a long, thin cylindrical coil of wire with 20000 turns, a radius of 5 cm and a length of 61 cm. Answer...
Back
Top