1. Write a C++ program that takes two binary numbers of 8 bits each represented with the letters Z and O (for zero or one) and displays the sum in binary with Zs and Os. Do this by converting the numbers to ints, adding the its using +, displaying the 3 ints, then converting the sum to Z and Os and displaying the result.
1. Write a C++ program that takes two binary numbers of 8 bits each
represented with the letters Z and O (for zero or one) and displays the
sum in binary with Zs and Os. Do this by converting the numbers to ints,
adding the its using +, displaying the 3 ints, then converting the sum to
Z and Os and displaying the result.
1 a.) Redo number 1, by doing a bit-by-bit addition, not forgetting the carry.
1b.) Write a program to take two numbers represented with roman
numerals and display the sum. Assume the sum will be less than 20.
Hints: Ask the user to terminate each number with a semicolon and use
chars to hold the roman ‘digits’.
The numbers are I, II, III IV, V, VI, VII, VIII, IX, X, XI, XII, XIII, XIV, XV…is
five,
Change the program to allow the sum to go up to 49
See how large a number you can handle. L is 50, C is 100, M is 1000.
Using basic C++ int, char, if- else statements, and switch statements, please! no functions, or strings, or Cmath etc.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images