Question

In: Computer Science

need this in C++ Start Declarations number currentTuition number futureTuition number interestRate number numYears number year...

need 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

Solutions

Expert Solution

#include <iostream>

using namespace std;

int main(){

int currentTuition;

int futureTuition;

int interestRate;

int numYears;

int year;

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 (int year = 2 ;year< numYears;year++){

  futureTuition = futureTuition * (1 + interestRate/100.0);

  cout<< "Tuition at year "<< year<<" is "<<futureTuition<<endl;

  }

}

Note : Please comment below if you have concerns. I am here to help you

If you like my answer please rate and help me it is very Imp for me


Related Solutions

Mason is applying for a 30-year mortgage with a 5% interestrate. Mason has an annual...
Mason is applying for a 30-year mortgage with a 5% interest rate. Mason has an annual income of $50,000 and has no additional debt. His estimated monthly property taxes and homeowners insurance is equal to $430. What is Mason’s affordable mortgage amount?
C (1) Create three files to submit: ItemToPurchase.h - Struct definition and related function declarations ItemToPurchase.c...
C (1) Create three files to submit: ItemToPurchase.h - Struct definition and related function declarations ItemToPurchase.c - Related function definitions main.c - main() function Build the ItemToPurchase struct with the following specifications: Data members (3 pts) char itemName [ ] int itemPrice int itemQuantity Related functions MakeItemBlank() (2 pts) Has a pointer to an ItemToPurchase parameter. Sets item's name = "none", item's price = 0, item's quantity = 0 PrintItemCost() Has an ItemToPurchase parameter. Ex. of PrintItemCost() output: Bottled Water...
I need a C++ program using while loops that counts the number of characters in a...
I need a C++ program using while loops that counts the number of characters in a sentence. The user inputs a sentence and then terminates the input with either '.' or '!'. And then it needs to count and display the number of a's, e's, i's, o's, u's, and consonants. The program should read both lower and upper case. They don't want us using switch statements or string operators, and want us to us if else if statements. I have...
Assume that at the start of the reaction ΔG is a large negative number. As the...
Assume that at the start of the reaction ΔG is a large negative number. As the reaction proceeds toward equilibrium, which of the following are true? 1. The value of Q approaches the value of Keq. 2. The rate of the forward reaction is slowing down as the rate of the reverse reaction is speeding up. 3. The value of Q decreases. 4. The value of Keq decreases. 5. The value of Delta G° increases. 6. The value of Delta...
Start from number 5 The following table shows the number of marriages in a given State...
Start from number 5 The following table shows the number of marriages in a given State broke down by age groups and gender:                                                             AGE at the time of the marriage Less than 20 20-24 25-34 35-44 45 + Total Male 505 7,760 27,072 10,950 12,173 Female 1,252 11,405 27,632 9,651 10,352 Totals Use the table to answer questions (1) to (11). Use the information in the table to fill in the blanks in the row and column totals. How...
Write a menu driven C++ program that prints the day number of the year , given...
Write a menu driven C++ program that prints the day number of the year , given the date in the form of month-day-year. For example , if the input is 1-1-2006 , then the day number is 1. If the input is 12-25- 2006 , the day number is 359. The program should check for a leap year. A year is leap if it is divisible by 4 but not divisible by 100. For example , 1992 , and 2008...
IN C++ Implement in C++ a game called “Your Lucky Number”. The lucky number is calculated...
IN C++ Implement in C++ a game called “Your Lucky Number”. The lucky number is calculated based on an individual’s birth month, day, and year. The algorithm assigns any person a number between 1 and 9. Many people believe that a group of people with the same lucky number share common features. The lucky number is calculated as the sum of digits of the birth month, day, and year numbers. If this sum is not a single-digit then you need...
Program IN C Prompt the user to enter month number and year. Retain an appropriate response...
Program IN C Prompt the user to enter month number and year. Retain an appropriate response for invalid month numbers, but don’t worry about validity of year. 2.Determine the number of days in the month entered (ignore leap years). 3.Use the answer to step 2 in one FOR-LOOP to ask the user to enter a FAHRENHEIT temperature (integer or floating) for each day of the month utilizing a prompt that includes the DATE. a. Prompt the user to enter the...
Given two integers, start and end, where end is greater than start, write a recursive C++...
Given two integers, start and end, where end is greater than start, write a recursive C++ function that returns the sum of the integers from start through end, inclusive.Example: If start is 5 and end is 10 then the function will return: 45 which is sum of 5, 6, 7, 8, 9, and 10. int sum (int start, int end){
Assignment (C language, not C ++) Start a new project to store grade information for 5...
Assignment (C language, not C ++) Start a new project to store grade information for 5 students using structures. Declare a structure called student_t that contains : First name Last name Student ID Number Percentage grade Letter grade Create the following functions: getStudentInfo(void)- Declares a single student object - Uses printf()/scanf() to get keyboard input for Name, SID, and Percentage (not Letter). - Returns a single student structure calcStudentGrade(student_t *st_ptr)- Takes the pointer to a student (to avoid making a...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT