C++ Program to convert a decimal number into binary with constructor overloading.

By Prof. Fazal Rehman Shamil

Write a program in C++ to convert a decimal number into binary without using an array by using the constructor overloading.

Decimal to binary C++

Output

Enter 1 FOR Single parameter Constructor.

Enter 1 FOR Single parameter Constructor.

2

You Have Selected Single Parameter Constructor.

Enter First Decimal no. to convert into BINARY no: 4

Enter Second Decimal no. to convert into BINARY no: 8

binary number=100

binary number=1000

 

Prof.Fazal Rehman Shamil (Available for Professional Discussions)
1. Message on Facebook page for discussions,
2. Video lectures on Youtube
3. Email is only for Advertisement/business enquiries.

Leave a Reply

Your email address will not be published. Required fields are marked *