Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I am having to use C++ and nothing else. Can someone please help me witht his C+

ID: 3742333 • Letter: I

Question

I am having to use C++ and nothing else. Can someone please help me witht his C++ problem.

Using C++.

Back in March 2017 I was in a wreck where I totaled my Hyundai Elantra. Since then I have been traumatized to drive a regular vehicle and therefore took over my partners Chevy Avalanche and have him drive the Monte Carlo or 300GT that we have. Now my son will be driving soon and it is time to give in and purchase a new vehicle. I have a few vehicles on my radar: Tahoe, Highlander, Murano, Sonata (even though it's a car), and here recently a Santa Fe. Now I have been doing my research for some time to make sure that I buy the car I really want and I have entered the phase of test driving all of these vehicles to make a final determinations. However, since the Santa Fe just recently came to mind I have not done my research on it.

Your task is to write a program that will ask the user, me, for the following information: Full price of the vehicle, financing percentage, down payment, insurance, estimated miles driven per week, current gas prices, insurance payment, oil change charges, miscellaneous monthly charges. Once all this information is gathered your program should display a monthly finance payment with a 72 month loan(that has been calculated from the full price, down payment, and finance percentage), it should also calculate the amount of money that I will spend on gas a month based on the estimated miles driven per week and the current gas prices, and note that oil changes only occur every 3 months.

Your program should then display a summary of the information that I have provided, the total monthly cost of these expenses (you'll have to break it down by month because you'll have different amounts with the oil changes), and the total annual cost of these expenses.

The output for this program will be dependent on the information that is entered. You are encouraged to calculate everything by hand and double check your calculations with your program output. Professor Mayfield will grade based on numbers that she chooses to use for the requested user information.

NOTE: To save you some headache this link has the formula that you can use to calculate the vehicle payment AND you can then double check that your program is working based on the answer the calculator on the link provides you. IF YOU REFERENCE THIS SITE YOU MUST STILL CITE IT ON YOUR ASSIGNMENT.

https://www.ifsautoloans.com/car-loan-interest/

Also, remember to use variables not hard coded numbers into your program. If it's a number (example "Total number of months in a year") that will never change, then you should create a constant variable and assign the value to the variable name.

Explanation / Answer

HERE IS YOUR CODE :)

HOPE YOU LIKE IT AND HIT THE THUMPS UP ;)

#include <iostream>

#include <stdio.h>

#include <math.h>

using namespace std;

int main()

{

float principal, rate, time, emi;//INTIALISING VARIABLES FOR CALCULATING MONTHLY EMI

char a[20];

int b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;

cout<<"ENTER YOUR NAME :";//STORING VALUES IN THE VARIABLE

cin>>a;

cout<<" ENTER FULL PRICE OF VEHICLE:";

cin>>b;

cout<<" ENTER FINANCING PERCENTAGE :";

cin>>rate;

cout<<" ENTER DOWN PAYMENT :";

cin>>d;

cout<<" ENTER TIME PERIOD FOR LOAN IN YEARS :";

cin>>time;

cout<<" ENTER INSURANCE PAYMENT :";

cin>>e;

cout<<" ENTER ESTIMATED MILES DRIVE OF YOUR VEHICLE PER WEEK : ";

cin>>f;

cout<<" ENTER CURRENT GAS PRICE :";

cin>>g;

cout<<" ENTER THE OIL CHANGE PRICE :";

cin>>h;

cout<<" ENTER MISCELLANEOUS MONTLY CHARGE :";

cin>>i;

p=b-d;

principal=p;

rate=rate/(12*100); //ONE MONTH INTEREST

time=time*12; //TIME PERIOD FOR YEAR

emi= (principal*rate*pow(1+rate,time))/(pow(1+rate,time)-1);//FORMULA FOR CALCULATING THE MONTHLY EXPENSES

cout<<"*********************************************";

cout<<" MONTHLY FINANCE PAYMENT IS= "<<emi;

j=g+h;//FOR ADDING THE CURRENT OIL PRICE + CHANGE IN THE OIL PRICE

l=f/j;//FORMULAE FOR CALCULATING GAS PRICE FOR WEEK

n=l*4;//THAN MULTIPLYING THE IT WITH FOUR TO CALCULATE FOR MONTH

cout<<" MONEY SPEND ON GAS PER MONTH :"<<n;

cout<<" YOUR NAME IS :"<<a;

m=emi+n+i;//MONTHLY EXPENSE CALCULATING

cout<<" YOUR MONTHLY EXPENSE IS :"<<m;

o=m*12;//MULTIPLYING MONTHLY EXPENSES WITH 12 TO CALCULATE FOR MONTH;

cout<<" YOUR YEARLY EXPENSES IS :"<<o;

  

return 0;

}