please write c++ program to solve this problem without using array Your program will be "menu driven". This means that after every completed operation by your program, the user is presented with a...



please write c++ program to solve this problem without using array


Your program will be "menu driven". This means that after every completed operation by your program, the user is presented with a menu of options once again. EVERY menu will have a "Quit" option that will exit the user completely from your program. Create your menu options with brief but meaningful labels.



The first option
of your program will prompt the user to enter a positive binary number (base 2 -- 1's and 0's only) of no more than 6 digits. Read this value as an int type value and your program must make sure that it is indeed a binary number (only 1's and 0's). If it isn't, then the user is prompted again. If it is binary, then your program is to calculate the equivalent decimal value (base 10 -- the number system).



The second option
of your program will prompt the user to enter 3 positive numbers in the range1 to 10, and will tell the user whether the three inputs will form the sides of a triangle. That is, your program is to determine whether or not the three input values can possibly be the three sides of a triangle. For instance, 3, 4, and 10 cannot be sides of a triangle because the longest side is greater than the sum of the other two sides (they don't satisfy the "triangle inequality").



The third option
will be Quit.


Maintain a log of outputs to an output.txt file. Write three functions,



  • menu_function, this function will display menu options repeatedly, there is no returned values from this

  • binary_decimal_function, this function will take as input one integer (base 2) number and return as output its equivalent decimal value.

  • tringle_function, this function will receive as input three integer positive numbers in the range 1-10, and determine whether or not the three input values can possibly be the three sides of a


- (D or d) to convert binary number to its equivalent decimal<br>-(T or t) to findout wether three numbers will form tringle sides<br>- (Q or q) to Quit<br>Enter you choice t<br>Plz enter 3 positive numbers in the range1 to 10e<br>30 90 800<br>Warning ....wrong input try again<br>Plz enter 3 positive numbers in the rangel to 100<br>30 90 80<br>The three input values 30 , 90 , 80 can possibly be the three sides of a triangle<br>- (D or d) to convert binary number to its equivalent decimal<br>-(T or t) to findout wether three numbers will form tringle sides<br>-(Q or q) to Quit<br>Enter you choice t<br>Plz enter 3 positive numbers in the rangel to 100<br>зе 10 5е<br>The three input values 30 , 10 , 50 can NOT be the three sides of a triangle<br>Sample of output LOG file.<br>The equivalent decimal number is 25 for the input binary number 11001<br>The three input values 30 , 90 ,80 can possibly be the three sides of a triangle<br>The three input values 30 , 10 , 50 can NOT be the three sides of a triangle<br>

Extracted text: - (D or d) to convert binary number to its equivalent decimal -(T or t) to findout wether three numbers will form tringle sides - (Q or q) to Quit Enter you choice t Plz enter 3 positive numbers in the range1 to 10e 30 90 800 Warning ....wrong input try again Plz enter 3 positive numbers in the rangel to 100 30 90 80 The three input values 30 , 90 , 80 can possibly be the three sides of a triangle - (D or d) to convert binary number to its equivalent decimal -(T or t) to findout wether three numbers will form tringle sides -(Q or q) to Quit Enter you choice t Plz enter 3 positive numbers in the rangel to 100 зе 10 5е The three input values 30 , 10 , 50 can NOT be the three sides of a triangle Sample of output LOG file. The equivalent decimal number is 25 for the input binary number 11001 The three input values 30 , 90 ,80 can possibly be the three sides of a triangle The three input values 30 , 10 , 50 can NOT be the three sides of a triangle
Example valid/invalid inputs and the expected outputs.<br>- (D or d) to convert binary number to its equivalent decimal<br>-(T or t) to findout wether three numbers will form tringle sides<br>-(Q or q) to Quit<br>Enter you choice D<br>Plz enetr a positive binary number (base 2 -- 1's and e's only) of no more than 6 digits<br>10201<br>Narning ....wrong input try again<br>Plz enetr a positive binary number (base 2 -- 1's and e's only) of no more than 6 digits<br>10101010<br>Narning ....wrong input try again<br>Plz enetr a positive binary number (base 2 -- 1's and e's only) of no more than 6 digits<br>11001<br>The equivalent decimal number is 25 for the input binary number 11001<br>

Extracted text: Example valid/invalid inputs and the expected outputs. - (D or d) to convert binary number to its equivalent decimal -(T or t) to findout wether three numbers will form tringle sides -(Q or q) to Quit Enter you choice D Plz enetr a positive binary number (base 2 -- 1's and e's only) of no more than 6 digits 10201 Narning ....wrong input try again Plz enetr a positive binary number (base 2 -- 1's and e's only) of no more than 6 digits 10101010 Narning ....wrong input try again Plz enetr a positive binary number (base 2 -- 1's and e's only) of no more than 6 digits 11001 The equivalent decimal number is 25 for the input binary number 11001
Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here