I have two arrays and I'm trying to create a 3rd array that is the difference between the two arrays
Ex:
arrayA: 3 5 8 9
arrayB: 3 4 6 9
difference of A-B: 5 8
however, my code is just returning me an array of 0's
im trying to use my search method (which has been tested and works) to take a number from the first array and search it in the other array. If...
User Profile
Collapse
-
Arrays -- calculating statistics
My code runs fine for the most part...the only time it fails is when I type in a negative to end the array. I don't want the negative number to be included in the array and I thought that is what the while loop in the getNums method does. However, it is including this negative number when calculating the avg and it is doing something weird to the median. When the array end itself because the max size has been reached everything works fine. Can... -
I said for loop up there a few times i meant do-while...sorry -
Simple ATM Scenario --> Having trouble with do-while loop
I am having a problem with the validation of the account number and password.
The beginning of the program asks for users account # then pwd. The program is then supposed to go to a checkID method that checks the account number and pwd with 3 stored accounts (each account/pwd/balance is stored as one long string) so the checkID method breaks up the string into its seperate parts and then checks if the input matches. If it does match... -
While loop problem
My task is to take a user input that ranges from 1-50 and use it to create a triangle of asterisks. I.E:
Enter number: 5
*
**
***
****
*****
****
***
**
*
I know that i need 2 seperate embedded while loops and that the first one creates a row of asterisks equal to the row number until you reach the input and the second subtracts 1 asterisk until...
No activity results to display
Show More
Leave a comment: