Question

Please code this in C++: // Start // Declarations // number currentTuition // number futureTuition //...

Please code this in C++:

// Start
// Declarations
// number currentTuition
// number futureTuition
// number interestRate
// number numYears
// number year
//
// output "Please enter current tuition: "
// input currentTuition
// output "Please enter interest rate (e.g. 9.0 for 9 percent): "
// input interestRate
// output "Please number of years for tuition: "
// input numYears
// output “Tuition at year 1 is “, currentTuition
//
// futureTuition = currentTuition
// for year = 2 to numYears
// futureTuition = futureTuition * (1 + interestRate/100)
// output “Tuition at year “, year ,”is “, futureTuition
// endfor
// Stop

0 0
Add a comment Improve this question Transcribed image text
Answer #1
#include <iostream>

using namespace std;

int main() {
    double futureTuition;
    double interestRate;
    int numYears;
    int year;
    double currentTuition;

    cout << "Please enter current tuition: ";
    cin >> currentTuition;
    cout << "Please enter interest rate (e.g. 9.0 for 9 percent): ";
    cin >> interestRate;
    cout << "Please number of years for tuition: ";
    cin >> numYears;
    cout << "Tuition at year 1 is " << currentTuition << endl;

    futureTuition = currentTuition;
    for (year = 2; year <= numYears; year++) {
        futureTuition = futureTuition * (1 + interestRate / 100);
        cout << "Tuition at year " << year << " is " << futureTuition << endl;
    }
    return 0;
}
Add a comment
Know the answer?
Add Answer to:
Please code this in C++: // Start // Declarations // number currentTuition // number futureTuition //...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • What C++ data type should be returned from the function/method? // Start //     Declarations //       num amount //       num...

    What C++ data type should be returned from the function/method? // Start //     Declarations //       num amount //       num newAmount //       num interestRate //     output "Please enter the dollar amount.   " //     input amount //     output "Please enter the interest rate(e.g., nine percet should be entered as 9.0).   " //     input interestRate //     newAmount = FutureValue(amount,interestRate) //     output "The new dollar amount is ", newAmount // Stop // // // // num FutureValue(num initialAmount, num interestRate) //     Declarations //       num finalAmount //     finalAmount = (1 + interestRate/100) * initialAmount // return finalAmount

  • using the following pseudocode what C++ data types should be used for the variable "finalAmount" //...

    using the following pseudocode what C++ data types should be used for the variable "finalAmount" // Start Declarations num amount num newAmount num interestRate output "Please enter the dollar amount. // input amount output "Please enter the interest rate (e.g., nine percet should be entered as 9.0). // input interestRate newAmount FutureValue (amount, interestRate) // output "The new dollar amount is ", newAmount // Stop 17 num FutureValue (num initialAmount, num interestRate) Declarations num finalAmount finalAmount = (1 + interestRate/100)...

  • I need to now how to input the following code into the complier for C++ code....

    I need to now how to input the following code into the complier for C++ code. It is for chapter 8 question 7a in the PLD book // Start //     Declarations //         num MAXADS = 100 //         num adcatcode[MAXADS] //         num adwords[MAXADS] //         num curCode //         num numads //         num i //         num j //         num k //         num subtotal //         num temp //     output "Please enter the number of ads: " //     input numads //     if ((numads > 0)...

  • I need this coded in C++. I keep coming up with errors. // Start // Declarations...

    I need this coded in C++. I keep coming up with errors. // Start // Declarations // number id // string ownerName // string breed // number age // number weight // number weeklyFee // // output "Please enter owner's ID: " // input id // output "Please enter owner's name: " // input ownerName // output "Please enter dog's breed (no space in input, use '_' // instead; For example Great_Dane): " // input breed // output "Please enter...

  • Find Bugs in the pseudocode // A high school is holding a recycling competition // This program allows a user to enter a student's // year in school (1 through 4) // and number of cans collected // Data is entered continuously until the user wnats

    Find Bugs in the pseudocode// A high school is holding a recycling competition// This program allows a user to enter a student's // year in school (1 through 4)// and number of cans collected// Data is entered continuously until the user wnats to quit// After headings, output is four lines// one for each school year classstart   Declarations      num year      num cans      num SIZE = 4      num QUIT = 9    ...

  • C++ Code: PLEASE MAKE SURE THAT IS WORK -input any number between (0-100) • if the...

    C++ Code: PLEASE MAKE SURE THAT IS WORK -input any number between (0-100) • if the number is odd, the program ends (do nothing) • if the number is even, output all the even numbers to 100 above the input Requirements: use if statements (minimum 1), and minimum 1 loop

  • Write a C# Windows Forms App code in Visual studio with a "start", "stop", "up", "down",...

    Write a C# Windows Forms App code in Visual studio with a "start", "stop", "up", "down", "left" and "right" buttons and a textbox. The textbox should start printing numbers from 1 to 100 on the press of the "start" button and stop printing process immediately on the press of "stop" button. Also create a thread after stop button is pressed to allow manual input from  "up", "down", "left" and "right" buttons and print up, down, left or right in the same...

  • PYTHON PROGRAMMING - CODE THE PROGRAM BASED ON THE INSTRUCTIONS AND ALGORITHM PROVIDED home / study...

    PYTHON PROGRAMMING - CODE THE PROGRAM BASED ON THE INSTRUCTIONS AND ALGORITHM PROVIDED home / study / engineering / computer science / questions and answers / python programming - code the program based on ... Your question has been answered! Rate it below. Let us know if you got a helpful answer. Question: PYTHON PROGRAMMING - CODE THE PROGRAM BASED ON THE... Bookmark PYTHON PROGRAMMING - CODE THE PROGRAM BASED ON THE INSTRUCTIONS AND ALGORITHM PROVIDED Rainfall Algorithm Declare and...

  • Turning this Pseudocode into the described C++ Program? (will include Pseudocode AND Description of the Program...

    Turning this Pseudocode into the described C++ Program? (will include Pseudocode AND Description of the Program below!) Pseudoode: start   Declarations num deptNum num salary num hrsWorked num SIZE = 7 num totalGross[SIZE] = 0 string DEPTS[SIZE] = “Personnel”, “Marketing”,   “Manufacturing”, “Computer Services”, “Sales”, “Accounting”, “Shipping”                                                      getReady()    while not eof detailLoop()    endwhile    finishUp() stop getReady()    output “Enter the department number, hourly salary, and number of hours worked”    input deptNum, salary, hrsWorked return detailLoop()    if deptNum >= 1 AND deptNum...

  • Please put the following pseudocode into C++. Below the pseudocode is a header file as well...

    Please put the following pseudocode into C++. Below the pseudocode is a header file as well as a cpp file that needs to be included. // Start // Declarations // Automobile myAuto // string vin // string make // string model // string color // output "Please enter the Vehicle Identification Number: " // input vin // output "Please enter the Make: " // input make // output "Please enter the Mode: " // input model // output "Please enter...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT