Q. Using recursion, write a C++ function into b to convert an arbitrary integer n>=0 into binary. Call this function in the main program with the argument n (That's an easy part I can do that). In example; input n=27, output 11011.

If anyone can help me with this question, I would appriciate that.

Let me try to understand here... The function needs to return a that represents a binary integer? Or the actual bits of the returned value need to be the correct binary representation of the decimal value?

Yes, The function needs to return a that represents a binary integer. And no need to be decimal part. For exmaple; We give n value as 27 to the program, then it gives us an output as (11011)base2. Just base 2 no need another bases.

Oops I made a typo in my previous post. I meant to say "does the function need to return a string that represents the binary integer"? I ask this because the character sequence "10110" is not the same as 10110 (the first has a different bit sequence since each individual character has a corresponding ASCII value, which has its own bit sequence..) For example, the character '1' has ASCII value 0x31..

Anyway, to output the actual bits you can use fprintf( stdout, "%c", __) combined with the bit shift operator >> combined with bitwise & and bitwise |..

But I am guessing that you need the string representation... So you will find repeated mod a % b and division a / b here.. Hint: binary is base 2

So for this program im trying to print out the max height the projectile reaches and when i run the str on the object it dosent change the value to ...

Is C similar to C# (C-sharp); or are they completely different ? I was wondering if I should begin learning C# and the transition to C will be a tad ...

Write a program that displays all numbers divisible by 3 and 4 within a range entered by user. Display five numbers per line. Numbers are separated by exactly two spaces. ...