There's no guarantee that a quadratic equation has two roots. Further from the last equation the second root would be derived from:
$$\sqrt{x - q} + \sqrt{x - p} = 0$$
Which if you aren't dealing with complex numbers, which wasn't given in your original question, only has one possibility of...
Your main problem seems to be you're getting confused about how method declaration (i.e. the bit of code that says what the method does) relates to method usage. In your main method you're calling createPattern with 5 parameters userRows, userColumns, starterStr, secondStr and seperator but your...
Re: My FIrst Algebra Question
No you are missing the fact that the 3 is added to and not multiplied against the result of the bracket. The only way you'd multiply the three (3) from your first example or the four (4) from your second against the brackets is if the addition was replaced by a...
I'll just comment on one thing since this is a common misconception amount people without a math or computing background.
There is no real random number generation done by computers. The number picked are pseudo-random and are generated by a mathematical formula. Some of the math formulas used...
Having people type in a product number is not future proof. I never said all products needed to be seen at the same time on the list nor that the list had to be dropdown list. The system should allow for filtering to allow for users to narrow the focus down so that there are fewer products...
I'd argue your looking at the problem in the wrong way. The real question should be why are you having people type in the part numbers instead of selecting them from a list?
That being said bank/credit card numbers do not avoid numbers being side by side on a keyboard or keypad. They likely use...
In your code that final return is redundant. You either go into the if or the else block of the conditional and both have a return value so that final return 1; is unreachable code. In the OPs version of the code there are no return statements other than a final return at the end of the function...
Your correct that the answer is no. In terms of finding an example to show this the easiest way is to find some fraction that is greater than and not equal to 80% where subtracting one from the numerator and one from the denominator is less than and not equal to 80%. In other words find a...
There's a critical error on your recursive line. The recursive definition of exponent is given by:
$${a}^{n} = a * {a}^{?}$$
What's the ? supposed to be and how does that compare with your recursive definition?
If that code is supposed to count (i.e. do addition) I think you're missing something critical on the line. Also if you're supposed to count only the negative numbers you need to figure out whether the number at that spot in the linked list is negative. Two other questions for you to ponder...
You can clean up your solution by inverting the if statement as follows:
void longDivision(int dividend, int divisor, int decimalplace){
if (decimalplace > 0) {
cout << dividend / divisor;
longDivision((dividend % divisor) * 10, divisor, decimalplace - 1);
}
}
This...