Recent content by lcam2
-
L
Split Numerical Array of 100 Integer Values 0-99
Thanks , it is very clear. Im sorry, I am not very good with computers.- lcam2
- Post #10
- Forum: Engineering and Comp Sci Homework Help
-
L
Split Numerical Array of 100 Integer Values 0-99
Can someone help me?? I am really lost- lcam2
- Post #8
- Forum: Engineering and Comp Sci Homework Help
-
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 ) {...- lcam2
- Post #7
- Forum: Engineering and Comp Sci Homework Help
-
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...- lcam2
- Post #5
- Forum: Engineering and Comp Sci Homework Help
-
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...- lcam2
- Post #3
- Forum: Engineering and Comp Sci Homework Help
-
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...- lcam2
- Thread
- Array Numerical Split
- Replies: 9
- Forum: Engineering and Comp Sci Homework Help
-
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:- lcam2
- Post #7
- Forum: Engineering and Comp Sci Homework Help
-
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...- lcam2
- Thread
- Algorithm Gcd
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
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...- lcam2
- Post #5
- Forum: Engineering and Comp Sci Homework Help
-
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.- lcam2
- Post #3
- Forum: Engineering and Comp Sci Homework Help
-
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...- lcam2
- Thread
- C++
- Replies: 6
- Forum: Engineering and Comp Sci Homework Help
-
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...- lcam2
- Thread
- Years
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
L
Calculating Energy and Power in an Inductive Circuit
Is someone Willing to help me??- lcam2
- Post #2
- Forum: Introductory Physics Homework Help
-
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...- lcam2
- Thread
- Energy Magnetic Magnetic energy
- Replies: 2
- Forum: Introductory Physics Homework Help
-
L
Calculating Magnetic Field & Torque for a Circular Wire Loop
Thanks a lot, i was missing a Pi.- lcam2
- Post #4
- Forum: Introductory Physics Homework Help