Answered step by step
Verified Expert Solution
Question
1 Approved Answer
need help with c++ Develop a complete C++ program to perform arithmetic operations. You must include a function named calc() which accepts an arithmetic operator
need help with c++
Develop a complete C++ program to perform arithmetic operations. You must include a function named calc() which accepts an arithmetic operator (+ -/) and two operands as input parameters. Function calc() should return the answer of applying the operator to the operands using reference parameter. For example, with variable declarations float a, b, ans; the function can be called by using calca, "*"b, ans) to calculate the expression a multiplied by b and the result is stored in ans. This program will prompt the user to input two float values, and then calls functions calco four times to return the addition, subtraction, multiplication and division of the two input values. Sample output Enter two? Adon Stan Maan 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