Friday 15 January 2010

c++ - calling a function to change int to binary -


I have a function that changes it to binary when calling from the main function It gives an error Binary: Identifier not found What's wrong with the code?

  #include & lt; Iostream & gt; using namespace std; Int main () {int dec; Cin & gt; & Gt; December; Binary (DEC); Return 0; } Zero binary (integer decimal) {int remainder; If (decimal & lt; = 1) {std :: cout & lt; & Lt; Decimal; Return; Remainder = decimal% 2; Binary (decimal & gt; 1); Std :: cout & lt; & Lt; remainder; }   

You implement either the binary function on the main or the prototype defined

No comments:

Post a Comment