Sale!

COP 3223 Assignment 3 Introduction to C Programming Solved

Original price was: $40.00.Current price is: $35.00.

Category:

Description

5/5 - (1 vote)

Objectives

1. To give students practice at typing in, compiling and running simple programs.
2. To reinforce knowledge of assignment statements and arithmetic expressions
3. To learn how to use if 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 (fund.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 compute the yearly interest in the Fund and
determine how many $1000, $500, and $250 scholarships can be awarded.

 

For example, if the Fund had 500,000 dollars in it on September 30th 2016 and the yearly
interest rate was 3 percent then the Fund will have 515,000 dollars in it at the end of this
September. This gives them $15,000 to disburse as scholarship money.

If possible, the Fund prefers to award 5 $1000 scholarships, 10 $500 scholarships, and as many
$250 as they have money left for. With $15,000 the Fund can award 5 $1000 scholarships, 10
$500 scholarships, and 20 $250 scholarships. Your program should print this information for the
user.

If that is not possible, the Fund will award as many $1000 and $500 scholarships as they can.
For example, if they had $4,750 they would award 4 $1000 scholarships, 1 $500 scholarship, and
1 $250 scholarship.

Input Specification

1. The amount of money in the fund, n, as of one year ago where n is greater than or equal
to 0. (n may include decimal places)
2. The yearly percent rate, p, as an integer where p is greater than zero.

Output Specification

Output the result using the format below:
X $1000 scholarships will be awarded.
Y $500 scholarships will be awarded.
Z $250 scholarships will be awarded.
2

Output Sample

Below are some sample outputs of running the program. Note that these samples are 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
How much was in the fund last year?
40000
What is the yearly percentage rate?
2
0 $1000 scholarships will be awarded.
1 $500 scholarships will be awarded.
1 $250 scholarships will be awarded.

Sample Run #2
How much was in the fund last year?
1200000
What is the yearly percentage rate?
1
5 $1000 scholarships will be awarded.
10 $500 scholarships will be awarded.
8 $250 scholarships will be awarded.

Deliverables

One source files – fund.c – is to be submitted over WebCourses.

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.

Grading Details

Your programs will be graded upon the following criteria:
1) Your correctness
2) Your programming style and use of white space. Even if you have a plan and your program
works perfectly, if your programming style is poor or your use of white space is poor, you could
get 10% or 15% deducted from your grade.
3

3) Compatibility – You must submit C source files that can be compiled and executed in a
standard C Development Environment. If your program does not compile, you will get a sizable
deduction from your grade.