Link to the DIT Home Page

Dublin Institute of Technology, School of Computing
Ciarán O'Leary

  Home -> Teaching -> DT249-1 Programming and Algorithms -> Notes -> Week 05
  DT249-1 Programming and Algorithms

Week 05


Learning Outcomes:

Upon completion of this class, you should be able to:

  1. Use simple pseudo-code to design a solution to a problem.
  2. Design and implement programs of a reasonable size.
  3. Use the various features of C to create complex programs.

Tasks

1.

Complete the tasks from last week.

 

2. Write a program to

Prompt the user to enter incomes of each family member

The user will enter -1 when finished

Print out the average income per family member

See sample solution here.

 

3. If the average is less than 10000 tell the family to start saving

If the average is greater than 100000 tell the family to start donating

Otherwise congratulate the family on their spending behaviour

See pseudocode here.

See sample solution here.

 

4. Print out the income of each family member in a table, giving advice to each one, according to step 3.

See pseudocode here.

See sample solution here.

 

5. Get the user to enter the name of each family member as well, and print this out with the advice from step 3.

See sample solution here.


Further Reading

Pseudocode Standard

 

Hit Counter  [Home][School of Computing][Dublin Institute of Technology]