Implement loops and selection control statement in your advanced calculator, assignment help

User Generated

Obfnnq

Programming

Description

Implement loops and selection control statement in your advanced calculator.

Be creative. Have the program loop and allow the user to choose what operation to perform.

Evaluate the input from the user to match it to a value you choose for a particular operation.

Allow the program to exit at some point. please send me the answer in .CPP or .TXT file and thank you.

Unformatted Attachment Preview

//Create a simple program that stores the values of 2 variables,//Then perfoms the following operations and store the results in�//at least one other variable://Addition//-Substration//-Multiplication//-Square//-Cube//-Modulo// if the result of the addition operation is less than five, then tell the user the numbers are low// if the result of the addition operation is greater than five, then tell the user the numbers are high// if the result of the addition operation is five, then tell the user the numbers are good//Wee need to use the control statements to solve some complex problem and direct the flow of execution�//of our program:// if// if-else// switch// do-while// while// for// break// return//�//Preprocessor Directives //#include "StdAfx.h"#include #include using namespace std; //Global Declarations//Create my variables (Declaration) //*** Create variables to hold values double Variable1; double Variable2; //*** Create variable (s) to hold the result of the operations double OperationResult1, OperationResult2, OperationResult3;//Function Declarationsfloat Addition_Operation();//Define an object for a simple calculatorclass Simple_Calculator{ public: //Data members double Variable1; double Variable2; double Result; //Constructor for this object Simple_Calculator() { Variable1 = 0; Variable2 = 0; Result = 0; } //Function Set-UP: Initialize your data members void Set_Up() { Variable1 = 4; Variable2 = 6; Result = 0; } //Methods (members) double Addition() { //Perform Addition� //*** Add Variable1 and Variable2 and save the result Result = Variable1 + Variable2; //*** Output the result on the screen cout
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Hi buddy. I have finished the assignment. I have tried upload the program as a .cpp or .sln in visua...


Anonymous
Really useful study material!

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags