Program1 - Introduction to C - Programming Assignment #1...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Due date: Please consult WebCourses for your section Notes 1. Please read the notes on Dev C++ and WebCourses provided with Lab #0 if you didn’t get a chance to do that lab. Objectives 1. To give students practice at typing in, compiling and running simple programs. 2. To learn how to read in input from the user. 3. To learn how to use assignment statements and arithmetic expressions to make calculations Introduction: UCF’s Theme Park Now that UCF is the second largest university in the nation (in terms of number of students enrolled), the decision has been made for UCF to pursue bigger goals. Since Orlando is the capital of the tourism industry, UCF has decided to enter the theme park market, to compete with Disney and Universal. After hearing about your exquisite programming skills from your Intro to C Programming teacher, UCF has decided to hire you to write some of the software necessary to help the theme park UCF is designing, Universally Comical Funland. In the following assignment you will write three separate programs to be used in the theme park! Problem A: Gift Shop Purchase (shop.c) Everyone knows that the first component every theme park needs is a gift shop to aid in revenue. Each of the many gift shops at Universally Comical Funland (UCF) will be equipped with the same type of cash register that needs a small program to make calculations for tourist purchases. For this problem, you’ll design a program that completes a simple type of transaction. You will ask the user for the price of the item they are buying, the quantity of the item they are buying, and whether or not the item is a taxed item. The user’s input for the last question will be 0 if the item is NOT taxed, and 1 if it is taxed. The tax rate for UCF should be defined in your program as a constant as follows: #define TAX_RATE 0.065 Note: The intention is to solve this problem WITHOUT an if statement or a switch statement. Full credit will only be given to solutions that avoid an if and switch. Input Specification 1. The item price will be a positive real number less than 100. 2. The quantity of the item purchased will be a positive integer less than 100.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/09/2011 for the course COP 3223 taught by Professor Guha during the Spring '08 term at University of Central Florida.

Page1 / 5

Program1 - Introduction to C - Programming Assignment #1...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online