|
|
dan neely wrote:
All 12 of them.
Yeppers
I'd like to help but I don't feel like Googling it for you.
|
|
|
|
|
This is no maths. Post this on the board for "Old and silly jokes" not here.
------------------------------
PROST Roleplaying Game
War doesn't determine who's right. War determines who's left.
"Would you like us to drop a bomb on you too? We have 10,000 of them!"
- espeir
"Perhaps we should lend them a nuke or two."
- espeir
|
|
|
|
|
...when I travel and meet foreign people, it happens to ask - sometimes - stupid things. They, kindly say:
- That's a good question...
I think that you posted a good question...;P
|
|
|
|
|
Divide 30 by half and add 10, so what will you get?
|
|
|
|
|
Integer or floating point arithmetic?
|
|
|
|
|
|
how old are you ?
|
|
|
|
|
Muliply 30 with half and subtract 5.
------------------------------
PROST Roleplaying Game
War doesn't determine who's right. War determines who's left.
"Would you like us to drop a bomb on you too? We have 10,000 of them!"
- espeir
"Perhaps we should lend them a nuke or two."
- espeir
|
|
|
|
|
maybe lying on his birthdate... i don't think 1984 seems correct... lol
|
|
|
|
|
toxcct wrote: maybe lying on his birthdate... i don't think 1984 seems correct... lol
Or someone was using the account of his big brother
------------------------------
PROST Roleplaying Game
War doesn't determine who's right. War determines who's left.
"Would you like us to drop a bomb on you too? We have 10,000 of them!"
- espeir
"Perhaps we should lend them a nuke or two."
- espeir
|
|
|
|
|
What are the ways to find a cube of a number other than
1. X~3 = X * X * X
note : ~ = to the power
|
|
|
|
|
X2*X
"I know which side I want to win regardless of how many wrongs they have to commit to achieve it." - Stan Shannon
Web - Blog - RSS - Math - LinkedIn
|
|
|
|
|
X^3 = (2X)^2 + (X^2)*(X-4)
^ power
* multiply
|
|
|
|
|
|
If X doesnt work then, you can make use of Y
Y~3 = Y * Y * Y
note : ~ = to the power
|
|
|
|
|
noname71 wrote: X~3 = X * X * X
Y = X³ = X * X * X
Are you looking for X?
Then you should take the third root out of Y.
Are You looking for the power (3 in this case) with X^n?
Y = X^n
log(Y) = n * log(X)
n = log(Y) / log(X)
If you are looking for Y just multiply
Regards,
Ingo
------------------------------
PROST Roleplaying Game
War doesn't determine who's right. War determines who's left.
"Would you like us to drop a bomb on you too? We have 10,000 of them!"
- espeir
"Perhaps we should lend them a nuke or two."
- espeir
|
|
|
|
|
|
Don't post homework problems here
Do it yourself!
That's no moon, it's a space station. - Obi-wan Kenobi
|
|
|
|
|
thanks for your help and just to let you know i have tried to do it myself and the idea of this site is to ask for help.we are not all as clever as others when it comes to c++.
thanks for your advice
klck2000
|
|
|
|
|
klck2000 wrote: we are not all as clever as others when it comes to c++.
Nobody is gonna write a whole program for you. Most people tend to rather you put some effort into solving the problem yourself, rather than just post your homework question so other people can do your dirty work while you don't learn the material.
None of the uber programmers started off as such you know. It takes effort.
BTW, if you don't understand something, why can't you ask your teacher for clairty? I mean, that's what they are there for right?
Jeremy Falcon
|
|
|
|
|
Calculating the mean and median are a fairly easy task. Standard Deviation is a little harder.
What do you need help with, exactly what don’t you understand how to do?
Before you answer that, write out some pseudo code and go through the logic.
Post a specific question that proves you have attempted this on your own, otherwise I don’t think you will get much help.
If you need links to information for standard deviation you can find more then enough information using google. However, I will start you off.
http://www.med.umkc.edu/tlwbiostats/variability.html#deviation[^]
Good luck and enjoy the challenge.
will
I hate users. Not all of them, just the ones who talk.CP member: Al Einstien
|
|
|
|
|
Given two arrays, containing equal number of elements but not in the same order of appearance, what is the fastest method of checking whether the elements in the arrays match or not?
Note - This should be accomplished without sorting the arrays.
Cutebug
|
|
|
|
|
There are only two efficient ways do compare such datastructures: building two efficient ones (like trees or hash table) or by sorting them. Why don't sort, it would be the fasted? Is it for school, I can't imagine another problem with such "curious" restrictions???
Perhaps you should go a little bit into detail, perhaps we can find another solution then.
Regards,
Ingo
------------------------------
PROST Roleplaying Game
War doesn't determine who's right. War determines who's left.
|
|
|
|
|
I'd do the following:
another array of the same size as the first two. used to store flags (say: all values initialized as 'o' and they are to be set to 'x')
if array1.size != array2.size
abort with message "not identical"
arraysize = array1.size
For i = 0 to arraysize
iterate over array1 with i
For j = 0 to arraysize
iterate over array2 with j
if array1[i] == array2[j] && array3[j] != 'x'
array3[j] = 'x'
else if j == arraysize - 1 abort with message "not identical"
else continue
message "identical"
(i wrote this down from memory. if this doesnt work, my memory failed me.)
Basically, you need to examine each element of the first array and see if there is a match in the second array. If there is a match, you need to exclude that element from further comparison (so you can have multiple identical objects in one array and you dont match one object against 2 others). The check is over once you reach the end of the second array without finding a match for an element of the first array.
Since the arrays are unsorted, you need additional space for each element of array2 to remember if it was already used for a match. Also, in the worst case, you have to make (n² + n) comparisons and n assignments to compare both arrays.
if you had 2 containers with sorted contents, you would not have to make any assignments and only n comparisons in the worst case.
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|