This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: s int year, mileage, months, endmilesfirst, endmilessecond; i double cost,tax,morethan, total, permonth; d cout<< "What is the make of the car? "; cin>> make; cout<< "What is the model of the car? "; cin>> model; cout<< "What is the year of the car? "; cin>> year; cout<< "What is the mileage of the car (no tenths)? "; cin>>mileage; cout<< "What is the cost of the car? "; cin>>cost; cout<< "How many months for the loan? "; cin>>months; c tax = .06; morethan = cost * tax; total = cost + morethan; t permonth = total / months; p endmilesfirst = months * 1000; endmilessecond = endmilesfirst + mileage; e cout << "Your " <<year<< " " <<make<< " " <<model<< " costs $" << total << " after sales tax and will cost you " << permonth << " per month for " <<months<< " months. When it is paid off, you will probably have " << endmilessecond<< " miles on it." <<endl; w }...
View Full Document
This note was uploaded on 01/11/2010 for the course CMPSC 101 taught by Professor Drobish,renee during the Summer '07 term at Pennsylvania State University, University Park.
- Summer '07