Can somone help me with this program

#include<iostream>
#include <cmath>
#include<iomanip>
using namespace std;

//function prototype
double getPayment(int,double,int);

int main()
{
int carPrice = 0;
int rebate = 0;
double creditRate = 0.0;
double dealerRate = 0.0;
int term = 0;
double creditPayment = 0.0;
double dealerPayment = 0.0;

cout << "car price:";
cin >> carPrice;
cout << "Rebate:";
cin >> rebate;
cout << "Credit union rate:";
cin >> creditRate;
cout << "Dealer rate:";
cin >> dealerRate;
cout << "terms in years:";

//call function to calculate payments
creditPayment = getPayment(carPrice - rebate, creditRate / 12, term * 12);
dealerPayment = getPayment(carPrice, dealerRate / 12, term * 12);

//display payments
cout << fixed << setprecision(2) << end1;
cout << "Credit union payment: $" << creditPayment <<end1;
cout << "Dealer payment: $" << dealerPayment << end1;
return 0;
} //end of main function

//*****function definitions*****
double getPayment(int prin, double monthRate, int months)
{
//calculates and returns a monthly payment
double monthPay = 0.0;
monthPay = prin * monthRate / (1 - pow(monthRate + 1, -months));
return monthPay;
} //end of getPayment function



1>------ Build started: Project: Intermediate19 Project, Configuration: Debug Win32 ------
1> Intermediate19.cpp
1>c:\cpp8\chap 09\intermediate19 project\intermediate19 project\intermediate19.cpp(34): error C2065: 'end1' : undeclared identifier
1>c:\cpp8\chap 09\intermediate19 project\intermediate19 project\intermediate19.cpp(35): error C2065: 'end1' : undeclared identifier
1>c:\cpp8\chap 09\intermediate19 project\intermediate19 project\intermediate19.cpp(36): error C2065: 'end1' : undeclared identifier
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
'end1' : undeclared identifier
endl, not end1.
what would I change the end1 into. DO I have change the symbol
What mbozzi posted above - endl ends with a lower case L, not the number 1.
I just palmed my face --- I remember doing this once. endl stands for "ENDLine", not "end one".

Note -- for most people the font used by this site (within code tags) is distinctly chosen to have serifs in the right place -- so you can tell the difference between the characters LI|l1i0oO. If you can't see the differences, you should install a better font -- it should help.
Last edited on
Topic archived. No new replies allowed.