One division of Programmers for a Better Tomorrow is their Scholarship Endowment Fund. They provide yearly scholarships to students who need a hand in amounts of 1000, 500, and 250 dollars. The money for these scholarships comes from interest made on previous donations and investments. You will create a program to track the amount in the Fund as various donations and investments are made. Donations are a one-time increase to the amount. Investments are listed as one-time decreases with the return on investment (ROI) being calculated at a later time. ROI is not within the scope of this assignment. To begin the program, ask the user for the starting balance of the fund. Then, your program should allow the user the following options: 1) Make a donation 2) Make an investment 3) Print balance of fund 4) Quit Option 1: Prompt the user for their donation amount. Add this amount to the balance of the fund. Option 2: Prompt the user for their investment amount. In order to continue to provide scholarships, the fund cannot be allowed to fall below its initial amount. If an investment would bring the fund below that value, then simply print out “You cannot make an investment of that amount.” If the amount is valid, deduct it from the balance of the fund. Option 3: Print the current balance of the fund, the current total number of donations, and the current total number of investments. 2 After options 1, 2, and 3 prompt the user with the menu again. Option 4: Print the final balance of the fund, the final total number of donations, and the final total number of investments. Do not prompt the user for any more information. Input Specification 1. Menu responses are guaranteed to be integers greater than zero 2. Each monetary value will be a numerical value between -20,000 and 20,000. Output Specification Any monetary values should be formatted to two decimal places. Output Sample Below is a sample output of running the program. Note that this sample is NOT a comprehensive test. You should test your program with different data than is shown here based on the specifications given above. In the sample run below, for clarity and ease of reading, the user input is given in italics while the program output is in bold. (Note: When you actually run your program no bold or italics should appear at all. These are simply used in this description for clarity’s sake.) Sample Run #1 ( Welcome! What is the initial balance of the fund? 15000 What would you like to do? 1 - Make a donation 2 - Make an investment 3 - Print balance of fund 4 - Quit 1 How much would you like to donate? 1000 What would you like to do? 1 - Make a donation 2 - Make an investment 3 - Print balance of fund 4 - Quit 2 How much would you like to invest? 2000 You cannot make an investment of that amount. What would you like to do? 1 - Make a donation 2 - Make an investment 3 - Print balance of fund 4 - Quit 2 How much would you like to invest? 500 What would you like to do? 1 - Make a donation 2 - Make an investment 3 - Print balance of fund 4 - Quit 3 The current balance is $15500.00. There have been 1 donations and 1 investments. What would you like to do? 1 - Make a donation 2 - Make an investment 3 - Print balance of fund 4 - Quit 1 How much would you like to donate? 2000 What would you like to do? 1 - Make a donation 2 - Make an investment 3 - Print balance of fund 4 - Quit 1 How much would you like to donate? 2000 What would you like to do? 1 - Make a donation 2 - Make an investment 3 - Print balance of fund 4 - Quit 4 The final balance is $19500.00. There were 3 donations and 1 investments. Restrictions Although you may use other compilers, your program must compile and run using Code::Blocks. Your program should include a header comment with the following information: your name, course number, section number, assignment title, and date. Also, make sure you include comments throughout your code describing the major steps in solving the problem.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter3: Understanding Structure
Section: Chapter Questions
Problem 20RQ
icon
Related questions
Question

C Programming Language

Assignment #4
Introduction to C Programming – COP 3223
Objectives
1. To learn how to use loops for repeated execution
2. To reinforce knowledge of If-Else statements for conditional execution
Introduction: Programmers for a Better Tomorrow
Programmers for a Better Tomorrow is an organization dedicated to helping charities, medical societies, and scholarship organizations manage various tasks so that they can focus on making the world a better place! They have asked you and your classmates to help them develop some new programs to benefit their organizations.
Problem: Scholarship Endowment Fund Part 2 (fund2.c)
One division of Programmers for a Better Tomorrow is their Scholarship Endowment Fund. They provide yearly scholarships to students who need a hand in amounts of 1000, 500, and 250 dollars.
The money for these scholarships comes from interest made on previous donations and investments. You will create a program to track the amount in the Fund as various donations and investments are made. Donations are a one-time increase to the amount. Investments are listed as one-time decreases with the return on investment (ROI) being calculated at a later time. ROI is not within the scope of this assignment.
To begin the program, ask the user for the starting balance of the fund.
Then, your program should allow the user the following options:
1) Make a donation
2) Make an investment
3) Print balance of fund
4) Quit
Option 1:
Prompt the user for their donation amount. Add this amount to the balance of the fund.
Option 2:
Prompt the user for their investment amount. In order to continue to provide scholarships, the fund cannot be allowed to fall below its initial amount. If an investment would bring the fund below that value, then simply print out “You cannot make an investment of that amount.” If the amount is valid, deduct it from the balance of the fund.
Option 3:
Print the current balance of the fund, the current total number of donations, and the current total number of investments.
2
After options 1, 2, and 3 prompt the user with the menu again.
Option 4:
Print the final balance of the fund, the final total number of donations, and the final total number of investments.
Do not prompt the user for any more information.
Input Specification
1. Menu responses are guaranteed to be integers greater than zero
2. Each monetary value will be a numerical value between -20,000 and 20,000.
Output Specification
Any monetary values should be formatted to two decimal places.
Output Sample
Below is a sample output of running the program. Note that this sample is NOT a comprehensive test. You should test your program with different data than is shown here based on the specifications given above.
In the sample run below, for clarity and ease of reading, the user input is given in italics while the program output is in bold. (Note: When you actually run your program no bold or italics should appear at all. These are simply used in this description for clarity’s sake.)
Sample Run #1 (
Welcome!
What is the initial balance of the fund?
15000
What would you like to do?
1 - Make a donation
2 - Make an investment
3 - Print balance of fund
4 - Quit
1
How much would you like to donate?
1000
What would you like to do?
1 - Make a donation
2 - Make an investment
3 - Print balance of fund
4 - Quit
2
How much would you like to invest?
2000
You cannot make an investment of that amount.
What would you like to do?
1 - Make a donation
2 - Make an investment
3 - Print balance of fund
4 - Quit
2
How much would you like to invest?
500
What would you like to do?
1 - Make a donation
2 - Make an investment
3 - Print balance of fund
4 - Quit
3
The current balance is $15500.00.
There have been 1 donations and 1 investments.
What would you like to do?
1 - Make a donation
2 - Make an investment
3 - Print balance of fund
4 - Quit
1
How much would you like to donate?
2000
What would you like to do?
1 - Make a donation
2 - Make an investment
3 - Print balance of fund
4 - Quit
1
How much would you like to donate?
2000
What would you like to do?
1 - Make a donation
2 - Make an investment
3 - Print balance of fund
4 - Quit
4
The final balance is $19500.00.
There were 3 donations and 1 investments.

Restrictions
Although you may use other compilers, your program must compile and run using Code::Blocks. Your program should include a header comment with the following information: your name, course number, section number, assignment title, and date. Also, make sure you include comments throughout your code describing the major steps in solving the problem.


Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
Introduction to Coding
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage