SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 210 Weeks Ago, 2 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 19 Nov 2017 My Price 7.00

ability to save data to a disk in one or more files.

loan calculator in C++, I need to add the ability to save data to a disk in one or more files. The menu(s) should give the user the option to save or retrieve data. This is my code so far.

 

#include <iostream>

#include <iomanip>

#include <cmath>

#include <fstream>

using namespace std;

int main()

{

float Principal;

float Interest;

int Months;

float AccInterest;

float monPayment;

float appPrincipal;

float endBalance;

cout << "Welcome to the loan calculator!" << endl;

cout << "Please enter the amount of your loan: ";

cin >> Principal;

cout << "Please enter the interest rate: ";

cin >> Interest;

cout << "please enter the amount of months the loan is for: ";

cin >> Months;

for (int x = 0; x < Months; x++)

{

AccInterest = (Principal) * (Interest / 100) / 12;

monPayment = (Principal * (Interest / 100) / 12) * (pow(1 + (Interest / 100) / 12, Months) / (pow(1 + (Interest / 100) / 12, Months) - 1));

appPrincipal = monPayment - AccInterest;

endBalance = Principal - monPayment + AccInterest;

cout << "Month " << x + 1 << " of " << Months << endl;

cout << "Starting Principal: $" << Principal << endl;

cout << "Payment is: $" << monPayment << endl;

cout << "Accured interest is: $" << AccInterest << endl;

cout << "Applied to Principal is: $" << appPrincipal << endl;

cout << "End balance: $" << endBalance << endl;

Principal -= appPrincipal;

cin.get();

}

return 0;

}

 

Answers

(5)
Status NEW Posted 19 Nov 2017 11:11 AM My Price 7.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)