Ch3Lab2 - cin >> raiseRate; c...

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

View Full Document Right Arrow Icon
//Ch3Lab2.cpp - calculates and displays the new weekly pay //Created/revised by <Loan Tran> on <09/10/09> / #include <iostream> # using std::cout; using std::cin; using std::endl; u int main() { //declare variables double currentPay = 0.0; double raiseRate = 0.0; double raise = 0.0; double newPay = 0.0; d //enter input items cout << "Enter current weekly pay: "; cin >> currentPay; cout << "Enter raise rate: ";
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 &gt;&gt; raiseRate; c //calculate raise and new pay raise = currentPay * raiseRate; newPay = raise + currentPay; n //display output item cout &lt;&lt; &quot;New pay: &quot; &lt;&lt; newPay &lt;&lt; endl; c system(&quot;pause&quot;); return 0; } //end of main function } /* Enter current weekly pay: 100 Enter raise rate: 10 New pay: 1100 Press any key to continue . . . */...
View Full Document

Ask a homework question - tutors are online