Lab3 - Lab 3 assigned 9/25, due Friday 10/7 at 11:59:00 pm...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Lab 3 – assigned 9/25, due Friday 10/7 at 11:59:00 pm - Build a calculator program to perform the following functions (to help you a little, the C++ code to print the user screen is included here): cout << "**********************************" << endl; cout << "* 1 - Add *" << endl; cout << "* 2 - Subtract *" << endl; cout << "* 3 - Multply *" << endl; cout << "* 4 - Divide *" << endl; cout << "* 5 - Raise X to the power Y *" << endl; cout << "* 6 - Sine ( x ) *" << endl; cout << "* 7 - Cosine ( x ) *" << endl; cout << "* *" << endl; cout << "* 0 - Quit *" << endl; cout << "**********************************" << endl; Your calculator must: 1. Print the above menu (or one of your own design) and ask the user to select an operation (choices 1 thru 7, or 0). DO NOT change the meaning of input codes (that is: 1 means ADD, 2 means SUBTRACT, and so on…) Hint: if you use the following line: using namespace std; you don’t have to precede cout and cin with std:: 2. Based on the user selection, your program must than ask for one or two operands. Hint: use the user input in if/else code:
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 11/03/2011 for the course EAS 230 at SUNY Buffalo.

Page1 / 2

Lab3 - Lab 3 assigned 9/25, due Friday 10/7 at 11:59:00 pm...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online