bartBorzeckiLabWeek1

bartBorzeckiLabWeek1 - 0; } Problem 3 Source Code(Sales...

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

View Full Document Right Arrow Icon
Bart Borzecki November 10, 2008 CIS 170 k Lab Week 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
Problem 1 Source Code (Sum of Two Numbers) #include <iostream> #include <ostream> using namespace std; int main() { int a = 62; int b = 99; int total; total = a + b; cout << "The Sum Of " << a << " and " << b << " is " << total << endl; return 0; } Problem 2 Source Code(Sales Prediction) #include <iostream> #include <ostream> using namespace std; int main() { int percentTotalSales = 62; int yearlyTotal = 4,600,000; int total; total = (percentTotalSales * yearlyTotal) / 100; cout << "Amount generated from sales this year is " << total << endl; return
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 0; } Problem 3 Source Code(Sales Tax) #include &lt;iostream&gt; #include &lt;ostream&gt; using namespace std; int main() { double stateTaxRate = .04; double countyTaxRate = .02; int purchase = 52; int totalTax; int stateTax; int countyTax; stateTax = stateTaxRate * purchase; cout &lt;&lt; &quot;Amount of State Tax &quot; &lt;&lt; stateTax &lt;&lt; endl; countyTax = countyTaxRate * purchase; cout &lt;&lt; &quot;Amount of County Tax &quot; &lt;&lt; countyTax &lt;&lt; endl; totalTax = stateTax + countyTax; cout &lt;&lt; &quot;Total Amount of Tax &quot; &lt;&lt; totalTax &lt;&lt; endl; return 0; }...
View Full Document

This note was uploaded on 06/06/2011 for the course CIS 115 taught by Professor Leipus during the Spring '08 term at DeVry Tinley Park.

Page1 / 3

bartBorzeckiLabWeek1 - 0; } Problem 3 Source Code(Sales...

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

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