Question: Problem Statement: A chocolate company has a new candy bar in the shape of a prism whose base is a 1-inch equilateral triangle and whose

Problem Statement:

A chocolate company has a new candy bar in the shape of a prism whose base is a 1-inch equilateral triangle and whose sides are rectangles that measure 1 inch by 2 inches. These prisms will be packed in a box that has a regular hexagonal base with 2-inch edges, and rectangular sides that are 6 inches tall.

  1. Write a pseudocode for a program that calculates the number of candy bars that fit into such a box.

  1. Source code and comments: Write a C code that calculates the number of candy bars that fit in such a box.

  1. Correctness: How many candy bars fit in such a box?

Teacher briefing:

Pseudocode is a simpler version of program code written in plain English before it is converted to program source code. It is a simplest way of writing a program code without following strict syntax (programming language grammar rules). Simply, Pseudocode is a set of instruction that will be translated to a different types of program code.

When you write the pseudocode, you must include the following five steps to get full point.

  1. Where is the programs starting point? start

  1. Inputs: what are your inputs?

  1. Processing: what is that process you need to follow to come up with a solution

  1. Outputs: what do you expect as an output?

  1. At what point the program stops? End

Example: a pseudocode for a program that adds two numbers, Num1 and Num2 to get Sum.

Start Inputs: Num1 and Num2 Processing: Sum = Num1 + Num2 Output: Sum End

Assessment: The teacher assesses:

  1. Understanding and fulfilling the requirement of the assignment

  1. The correctness of your pseudocode and the program code

Formula: find all the formulas you need from the class note under the weekly class module on D2L

Grading Criteria

  1. Pseudo code correctness: - 4 points for following all the steps

  1. Source code:

  1. Submitted a C program code fil

  1. Student Name appears at the top as a c program cod comment

  1. Program Description - as a c program comment

  1. Code analysis: Code correctness

  1. Output: correct output. No syntax error, compile, run, correct output

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!