Question: You must write a C program that prompts the user for two numbers ( no command line input) and multiplies them together using a la

You must write a C program that prompts the user for two numbers ( no command line input) and multiplies them together using a la russe multiplication. The program must display your banner logo as part of the prompt to the user. Th e valid range of values is 0 to 4000. Assume that the user will always enter numerical decimal format values . Your program should check this numerical range and re -prompt the user for correct input if necessary . The program must also allow the user to enter a character to ex it the program back to the terminal prompt. The program should print the result in decimal format and binary format. The binary output should use the least number of bits t o display the number in multiple s of 8 bits . I.e., anything less than 256 should display as 8 bits, anything less than 64k should use 16 bits. The value 4000 times 4000 should only need 24 bits.

You may NOT use any libraries other than stdio.h

You may NOT use the multiplication operator or the division operator o Use bitwise shifting to halve and double numbers

You must use two source files o One source file will contain the main() function, global variables, and proper function prototypes.

o The other source file will contain all other functions as specified below

o The program must be built using the compile command like Tutorials Point p27

You must have the following four functions

o One function that prints your logo banner

o One function that takes in a value and prints it in binary format

o One function that prompts the user for input and qualifies those values

o One function that takes in the two values, multiplies them and returns the result.

Your program must keep the two numbers and the result in global variables

There can be no magic numbers in the code o Any constants must be defined wi th a Macro.

We need two source file and four function.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!