Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C program that compares two sizes of pizza to determine which is the better buy. The program prompts the user to enter the

image text in transcribed
Write a C program that compares two sizes of pizza to determine which is the better buy. The program prompts the user to enter the diameter in inches and the price for each of two sizes of pizza then prints out the cost per square inch for each of the two sizes of pizza and will tell which is the better buy, that is, which has the lowest cost per square inch. (If they are the same cost per square inch, we will consider the smaller one to be the better buy.). Here is a sample output: Welcome to the Pizza Consumers: Enter diameter of small pizza (in inches): 10 Enter the Price of small pizza: $7.5 Enter diameter of small pizza (in inches): 13 Enter the Price of small pizza: $14.75 Small Pizza: Diameter 10 inches Price $7.5 per square inch $0.10 Large Pizza: Diameter 13 inches Price $14.75 per square inch $0.11 The small one is the better buy. Program Requirements: The code should be neatly indented, use meaningfu variable names and named constants and have appropriate, succinct comments. Your program must not use any loop statements. Grading Scheme: are as follows: This homework is worth 50 points. The specifications and points for each component 1. User Documentation (15 points) A neatly formatted document that addresses all of the following points in an itemized manner: () The purpose of the program (ii) Where the program is located, and how it is to be compiled and executed.i) Any particular issues that the user should be aware of. This includes any peculiarities of the program, and things the user should be careful about. The user document must be written such that a non- programmer can understand it. 2. Script file showing the source, compilation and test runs. (25 points) Using the script command start a script session, (see closed lab for details). Within this session, do the following a. Display the program (i.e, source code)... This is done using the command: cat filename> b. Compile the program. c. Test the program. Testing is a critical part of software development. Test cases are usually carefully designed to make sure that all aspects of the program are verified. You should carry out multiple tests to check various aspects of the behavior of the program. d. Exit the script session. 3. Test report. (10 points) Report the test results. 4. Items to submit. Create a folder Homework1. Place the source code (the cppfile), the script file, user document and test report in this folder; upload the folder to your CourseFiles folder for the course

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Progress Monitoring Data Tracking Organizer

Authors: Teacher'S Aid Publications

1st Edition

B0B7QCNRJ1

More Books

Students also viewed these Databases questions

Question

WHAT IS AUTOMATION TESTING?

Answered: 1 week ago

Question

What is Selenium? What are the advantages of Selenium?

Answered: 1 week ago

Question

Explain the various collection policies in receivables management.

Answered: 1 week ago