{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lab01hw-arith-soln - cin>> first cout<<"Enter...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
// Programmer: Doug Hogan - Solution // Section: N/A // Program: Homework Program: C++ Arithmetic // Date: August 25, 2008 // Description: This program takes in two numbers and performs the 4 // basic arithmetic operations on them. #include <iostream> // for cin, cout, endl using namespace std; // so std:: isn't needed int main() { double first; double second; cout << "Enter a number: ";
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: cin >> first; cout << "Enter another number: "; cin >> second; cout << first << " + " << second << " = " << first + second << endl; cout << first << " - " << second << " = " << first - second << endl; cout << first << " * " << second << " = " << first * second << endl; cout << first << " / " << second << " = " << first / second << endl; return 0; }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online