Starting from:

$30

Program #1: Hello, Weekly pizza budget

COP 3223 Program #1: Hello, Weekly pizza budget

Program A: Hello World (hello2.c)
The typical first program is to print out a single line that outputs "Hello World!". Edit the hello.c
program from our course notes so that it prints out a message of your choosing. Please choose an
appropriate message, but don't be afraid to be humorous!
Program B: Weekly pizza budget (pizza.c)
Pizza is a tasty and convenient late night snack when you are up late working on a COP 3223
program. Write a program that calculates how much you spent on pizza delivery in the last
week. Assume that a large pizza costs $10.00 plus tax and a medium pizza costs $7.50 plus tax.
Use the following constant at the top of your program:
SALES_TAX = .065
Prompt the user to enter how many large pizzas he or she ordered last week. Prompt the user to
enter how many medium pizzas he or she ordered last week. Calculate the total amount spent on
pizza, including tax. Print out the number of each pizza purchase and the total cost. With
respect to the total cost, don't worry about how many digits print after the decimal. Any answer
within a penny of the correct answer will be counted as correct.
Sample Program Run #1 (User Input in Bold and Italics)
How many large pizzas did you order last week?
2
How many medium pizzas did you order last week?
3
You bought 2 large pizzas and 3 medium pizzas last week.
You spent 45.262500 dollars on pizza last week.
Sample Program Run #2 (User Input in Bold and Italics)
How many large pizzas did you order last week?
4
How many medium pizzas did you order last week?
1
You bought 4 large pizzas and 1 medium pizzas last week.
You spent 50.587500 dollars on pizza last week.
Deliverables
Please submit two separate .c files for your solutions to these problems via WebCourses by
Monday, September 5, 2016 at 11:00 PM:
Program A: hello2.c Program B: pizza.c
Remember to include in both files a header comment with your name, course, section number,
and homework number. Remember also to include comments to explain what your code is doing.

More products