Recursive C++ Program to Convert a Decimal Integer into Binary Number

Here is a very simple and recursively written C++ program to convert a decimal integer number into its binary equivalent. However it returns the binary equivalent in the form of a string of characters but you can very easily write an other function to convert this string into an actual binary number as well. Continue reading Recursive C++ Program to Convert a Decimal Integer into Binary Number

Very Simple C++ programs – Nested loops Demonstration/Examples

Here are some extremely simple programs in C++ for absolute beginner students. I hope these would help them understand how nested loops work in programming. The required pattern of numbers to be printed on screen by a specific program is given before the source code to serve a problem statement.

1)
Required Pattern
1
12
123
1234
12345

Continue reading Very Simple C++ programs – Nested loops Demonstration/Examples