pls explain me what is binary search in c++.?
361615
Binary search is a common searching algorithm used in searching for values in a list of values. Its can be implemented by any programming language not just C++.\n\nhttp://en.wikipedia.org/wiki/Binary_search\n\nThis should give you a better explaination of it.
963773
It is done in C/C++. U can check that out in any of the windows programming books.
747743
Can not give you the code or you shall not learn... so please see Page 534 of "Mastering C++" by  R Venugopal, Rajkumar & T Ravishankar  from Tata McGrawHill.\n\nI hope this will help you...
67914
hey!! looking for ur c++ project.. source code online?? isnt a good idea!\n\nwell thetopic u've selected is idiotic.. \nu better submit an original work.. or else u'll loose marks!\n\nn if programming is ur problem.. n u're lookin for an easy way out.. try looking for tutorial sites for c++.. n search for samples .. but then be assured that ur teacher will come to know aboiut the authenticity just by the format.. \n\nwell if u're smart enough to edit the stuff n then submit it.. only then its of some use.\n\nn by the way.. i've heard of this project .. its common.. i mean even some of my batchmates did this project.. a very ordinary 1... so u may get some help from ur seniors as welll!!
588997
I use "C++ How to Program" by Deitel & Deitel.\nIt's really good
943372
u have to ponit it or use\n\nthese are the 2 way's:\n\n#include <iostream>\nusing namespcae std;\nint main()\n{\nint num[8];\nint index;\n\nnum[0] = 42;\nnum[1] = 2001;\nnum[2] = 7;\nnum[3] = 180;\nnum[4] = 99;\nnum[5] = 1993;\n\nfor(index = 0; index <= 5; index++)\n{\nstd::cout<< index[num] << endl;\n}\n system("pause");\nreturn 0;\n}\n\nor\n\n#include <iostream>\n#define MAX 20\nusing namespcae std;\n\nint main()\n{\n\nint a[MAX] = {23,43,4,5,34,343,12,14};\nint b;\n\ncout.setf(ios::right);\n\nfor(b = 0; b < MAX; b++){\n\ncout << endl << endl;\n\ncout << "The Elemnt in ";\n\ncout.width(2);\n\ncout << (b +1) << " is ";\n\ncout.width(2);\n\nstd::cout << b[a];\n}\nreturn 0;\n}
557543
#include<iostream>\nusing namespace std;\nint main ()\n\n\n    {\nint number;\nint answer;\n    cout<<"Please enter number: ";\n    cin>>number;\n    \n    cout<<number<<"! = ";\n    answer = number;\n    while (number>1)\n\n\n        {\n        answer=answer*(number-1);\n        number--; \n    } \n\n    cout<<answer; \n    return 0; \n}
1178612
Well.... That's too Hard to find... i'm poor at C++...... So can't help.. have good day! Search in Google
240615
I am giving the solution in C++ using recursion..\n\n!!\n\n#include<iostream.h>\nvoid printstars(int n)\n{\nfor(int k=0;k<n;k++)\n     cout<<"*";\ncout<<endl;\n}\nvoid print1(int n)\n{\nif(n<=1)\n   printstars(n);\nelse\n   printstars(n-2);\n}\nvoid print2(int m,int n)\n{\nif(m==n)\n   cout<<endl;\nelse \n{\n   printstars(m);\n   print2(m+2,n);\n}\n}\n\nmain()\n{\nint n,m=1;\ncout<<"Enter an odd number n";\ncin>>n;\nprint2(m,n);\nprint1(n);\n}\n\nThis produces the output u needed and also uses recursion.
153362
You need to look into "balanced trees". Check out any good algorithms book - my personal favourite is "Algorithms" by Robert Sedgewick.\n\nHope this helps!\n\n-----------\nEdit:\nBinary tree will not work as they have O(n) worst cases for maximum, minimum, search, insert and delete. These pathological cases are avoided by the rebalancing techniques used in balanced trees.
509576
It's a recursive function that's not primitive recursive.\n\nIt grows extremely fast.  See the Wikipedia entry.
227540
001100100001\n\nSorry braxton_paul, you're second answer is incorrect, as it is binary, BCD, or BINARY CODED DECIMAL, is different. as stated by wd5gnr, BCD wastes space, this is why the BCD number is 12 digits, and your binary is only 9. This is due to the fact that BCD has no base (at least in the normal sense), wheras binary is base two. Just because BCD uses only two characters, doesn't mean its base is two. This is due to the fact that BCD has no "place weight", for example, if you have 95473 (for a random example), in a base 10 (decimal) system, the 4 would have a value of 400. Say you have a binary system, and lets just use the BINARY of 321, or 101000001, (from RIGHT to LEFT) the ones place has a "weight of 1, the two's has a weight of 2, the three's has a wieght of 4, position 4 is 8, 5 = 16, so forth (each time you multiply the previous space by two)... So to convert BIN to DEC, just multiply the digit ocupying the space by the spaces value, so from right to lef, you would get 1x1=1, (the zeros do not matter since anything times zero is zero) 1x64=64, and 1x256=256... then simply add the values together, and you get the DEC equiv. of your BIN, so 1+64+256=321... Just try that with BCD... and you do indeed get 801... that is why it is called binary CODED DECIMAL. the lack of a base is why BCD can only easily be converted to and from Decimal and Binary, just try converting it to octal, or hex... it is a pain in the a$$ unless you first convert it to DEC...\n\nso (as if anybody cares):\n\n321 (DEC, or base ten) = 141 (HEX, or base sixteen) = 501 (OCT, or base eight) = 101000001 (BIN, or base two) = 001100100001 (BCD, or base ten incoded in base two)\n\nwheras:\n\n801 (DEC) = 321 (HEX [coinciednce]) = 1441 (OCT) = 1100100001 (BIN) = 100000000001 (BCD)\n\nBinary, and (B)inary (C)oded (D)ecimal are not the same!\n(and wd5gnr's BCD to DEC conversion table is correct)\n\nUsualy a dead give away when it comes to BCD vs. BIN, is that BCD usaly has preceeding zeros listed, but BIN does not (though preceeding 0's could also mean ASCII, BCH, or BCO, or prettymuch binary coded anything)
561896
Hi,\n\nYou can start reading the basic section in C++, they teach you on what are variables, what are datatypes, and what are loops.\n\nThey will teach you how to use arrays and loops and conditionals.\n\nThat is your best bet...\n\nPick up any standard C++ book and read he intro to programming!
139403
in decimal its 2\nin binary its  0\nin other like octal hexa etc its 2\nin logical or its 1\nnow wat do u want????
973961
a) i +(1/3)(j-i)\n\n  b)  \n1-12 =>1-4 & 5-12\n\n... 1-4=>1 & 3-4\n.......3-4=>3 & 4\n\n...5-12=> 5-6 & 7-12\n......5-6=> 5 & 6\n......7-12=>7-8 & 9-12\n..........7-8=>7 & 8\n..........9-12=> 9 & 10-12\n...............10-12=>10 & 11-12\n....................11-12=>11 & 12\n\n c) 1/3 of the computations lead to a subset of the previous set\nwhich is 1/2 the size of the other subset which is lead to twice\nas often. So it averages out to the same number of\ncomputations as a conventional binary search.
419823
You may have to be more specific.\n\nalgorithm.h is not a standard library, as such it will be impossible to know what kind of code is in it.\n\nThere are numerous sorting algorithms, some more efficient than others.  There's bubble-sort, insertion-sort, heap-sort, quick-sort, etc.  If you're interested in searching and sorting, try doing a google search.\n\nThere is a sort() tool for UNIX systems, but that uses data streams and pipes at the console level, not intended for use inside a program.\n\nIf you want, you can open up algorithm.h and take a look inside.  You won't be able to see what the function definitions are, but at least you can see what parameters it takes.  Also, if you're really lucky ;-) there will be comments in the file describing what kind of sort it uses.  Just do a little detective work, and you can get all the info you need.
142433
you havn't closed "void determinecost (...)" function with curly braces " } "\n\nin c++, you have to close any block of code with } that has been opened with {