Question
I need help with this C programming Prefix Calculator Would be nice to have the solution to this thanks for helping whoever does. Instructions Math
I need help with this C programming Prefix Calculator Would be nice to have the solution to this thanks for helping whoever does.
Instructions
Math library functions cannot be used to complete these tasks
Print instructions explaining how to operate the calculator
Print a menu using the options below If the user enters invalid options, print the options and get a new choice
Allow the user to continue entering calculations until they quit the program
You do not need to print the instructions and the menu options after each calculation - only when the user requests or if invalid input is received
Allow the user to input the calculation all at once (examples below).
+ 3 4
/ 4.3 2.3
^ 3.1 2
r 5 10
Allow the user to perform the following operations - You must use the operator symbols specified
add ( + ) should add two floats
subtract ( - ) should subtract two floats
multiply ( * ) multiply two floats
divide ( / ) divide two floats. first float divided by second float. Report an error when the user tries to divide by zero
power ( ^ ) a float and an integer, calculate the float raised to the integer. zero and negative exponents should work.
exponential ( e ) raise the numerical constant e (Eulers number, ~ 2.71828182846 ) to the power of the integer provided. zero and negative exponents should work. (you must define the constant)
factorial ( ! ) given an integer, calculate the factorial. store your result as a long
random_range ( r ) given two integers, generate a random integer between the two integers (inclusively). Be sure the lower bound is less than the upper bound
sum_range ( s ) calculate the sum of consecutive integers between two given integers (inclusively)
product_range ( p ) calculate the product of consecutive integers between two given integers (inclusively)
round ( ~ ) given a float, round to the nearest integers
round_up ( ' ) given a float, round up to the nearest integers
round_down ( _ ) given a float, round down to the nearest integers
minimum ( < ) given two floats, determine the lesse
rmaximum ( > ) given two floats, determine the greater
odd_or_even (#) given an integer, print if it is odd or even
menu (m) print the menu options
help (h) print all the instructions and the menu option
quit (q) quit the program
Your code must meet the following technical specifications
use at least two variables of different types
no global variables allowed
use a #define macro (see p220 of the book)
use at least one if or if else statement
use at least one switch statement
use at least one for loop
use at least one while or do while loop
use at least 6 functions with prototype.
Use a function for printing the instructions
Use a function for printing the menu
Use functions with input and output for some of the operations
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