solution4 - cout <<...

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

View Full Document Right Arrow Icon
CSCI-1100 Computer Science I Rensselaer Polytechnic Institute Spring 2004 Studio 4 -- Solutions // Generate bills for a lawn mowing service #include <iostream> #include <string> using namespace std; void bill( string billDate, // date for bill string name, // customer's name string addr, // customer's address string timesMowed, // number of times yard mowed string amountDue, // amount owed this month string dueDate ) // payment due by this date { cout << endl << endl; // skip lines before bill cout << "LAWNS R US YARD CARE" << endl << endl; cout << "Bill for " << billDate << endl << endl; cout << name << endl << addr << endl << endl;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: cout &lt;&lt; &quot;Your yard was mowed &quot; &lt;&lt; timesMowed &lt;&lt; &quot; times.&quot; &lt;&lt; endl &lt;&lt; endl; cout &lt;&lt; &quot;You own &quot; &lt;&lt; amountDue &lt;&lt; &quot;.&quot; &lt;&lt; endl &lt;&lt; endl; cout &lt;&lt; &quot;Payment is due: &quot; &lt;&lt; dueDate &lt;&lt; endl &lt;&lt; endl; } int main () { // Generate first bill bill ( &quot;June 1999&quot;, &quot;Mr. and Mrs. John R Smith&quot;, &quot;123 Crooked Street&quot;, &quot;5&quot;, &quot;125.00&quot;, &quot;July 15, 1999&quot; ); // Generate first bill bill ( &quot;June 1999&quot;, &quot;Mr. Old Man River&quot;, &quot;10 Water Street&quot;, &quot;4&quot;, &quot;100.00&quot;, &quot;July 15, 1999&quot; ); // Generate first bill bill ( &quot;June 1999&quot;, &quot;Mrs. Greenlawn&quot;, &quot;21 Plant Street&quot;, &quot;6&quot;, &quot;150.00&quot;, &quot;July 15, 1999&quot; ); return 0; }...
View Full Document

Ask a homework question - tutors are online