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 )
{...
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...
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...
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...
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...
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...
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.
[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...
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...
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...