Learn How to Program in C

by
Dr. Kristin Switala

Introduction

Directives

Variables

Conditionals

Loops

Arrays

Pointers

Strings

Functions


Site Map

Projects: Functions (b)

Instructions: Create a C program that runs successfully for each project below.


Project 1

Use the Shipping program in the Lesson. Add these things to the program:

  1. the price of each book is $39.95
  2. write a function to calculate the tax (use 0.08)
  3. calculate the total due = price + tax + shipping
  4. print the bill like this (I've pretended that the viewer ordered 12 books):
  5. Books Ordered:     12

    Price:
    Tax:
    Shipping:

    Total Due:

    $479.40
    $38.35
    $15.00

    $532.75

Copyright
© 2001
Kristin Switala
Hosted by www.Geocities.ws

1