{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

solution4 - cout<<"Your yard was mowed"<<...

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

{[ snackBarMessage ]}

Ask a homework question - tutors are online