Write a complete program that acts as a calculator, very similar to the calculat
ID: 3619495 • Letter: W
Question
Write a complete program that acts as a calculator, very similar to the calculator program from Lab 3. Inthis assignment, your calculator should allow the user to enter more than one formula. Only when the
user enters the formula "0.0 / 0.0" should your program finish. Until the user enters that formula, your
program should loop, continually asking for a new formula and printing the result of the computation. The
loop can be created as a while loop.
Be sure to run the tester to discover the exact wording of the messages you need to print and to ensure
your math operations are correct. I will run the tester to assist my grading.
Explanation / Answer
#include<iostream> using namespace std; int main() { char str[1000]; char *ptr1,*ptr2; float result;char opr[10]; cout<<"Simple c++ calculator Operator supported : + - / * Input form : a operator b e.g 1+4 "; while(1) { cout<<"Enter formula:";Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.