Answer to Question #17305 in C++ for sahar

Question #17305
I want to determine how many items in each list are twice some other item in the same list?
For example, given the list
1 4 3 2 9 7 18 22
I should answer 3, as 2 is twice 1, 4 is twice 2, and 18 is twice 9.
for example this input
1 4 3 2 9 7 18 22 0
2 4 8 10 0
7 5 11 13 1 3 0
-1
output is
3
2
0
1
Expert's answer
2012-10-26T10:26:25-0400
Dear visitor
Unfortunately, the statement of your question is a bit confusing.
Please clarify the statement so we could help you

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS