Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hi Im having trouble with this problem. So far I wrote the first function and its not working well. And I also need help with
Hi Im having trouble with this problem. So far I wrote the first function and its not working well. And I also need help with the second function.
Write a c++ program to convert binary numbers to decimal and decimal numbers to binary. You need to create two functions bin_to_dec and dec_to_bin.
bin_to_dec should take a binary number as a STRING and then convert it to an INT as a decimal number.
Dec_to_bin should take a decimal number as an INT and then convert it to a STRING as a binary number.
NOTE: These functions should only convert Unsigned(positive) numbers. DO NOT worry about signed numbers.
Thanks in advance.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started