# programming in c++

posted by .

a program in c++ that accepts exam marks for 10 students and stores them in an array.the program should then calculate and utput the average marks for the class.and give an account of marks below average and output all marks above average.

• programming in c++ -

You're welcome to post your pseudocode and ask specific questions so we know where help would be needed.

• programming in c++ -

I need some help and guidance to solve this problem.
Week 4 CheckPoint – Repetition and Decision Control Structures

In one of the week 3 discussion questions we discussed the algorithm that would be required to make a peanut butter sandwich. In this CheckPoint you will need to take that one step further and create a program design to make a peanut butter sandwiches. Below you will find a partial program design; you need to complete it by adding the pseudocode in the required areas. You need to add one repetition (loop) control structure and one decision control to complete the program design. The user will decide how many sandwiches are made; this is where the loop will be used. The user will decide if the sandwich includes jelly, and, if it does, what flavor of jelly; to keep it simple we are only allowing grape or strawberry jelly.

Analysis

Process:
1. Ask user how many sandwiches to make
2. Ask user if they want jelly on their sandwich
3. If jelly is requested, ask user what flavor (grape or strawberry) of jelly they would like
4. Make peanut butter and, if required, jelly sandwiches

Input:
NumberOfSandwiches (integer)
IncludeJelly (string; values Yes/No)
TypeOfJelly (string; values Grape/Strawberry)

Output:
Sandwich

Design

Main Module

Declare NumberOfSandwiches as integer
Declare IncludeJelly as string
Declare TypeOfJelly as string
Declare Continue as Boolean
Set Continue to true

Do While Continue = true
Call InputModule
EndDo

End Main Module

InputModule

Display "How many sandwiches would you like to make? Enter 0 to end program."
Input NumberOfSandwiches

If NumberOfSandwiches = 0
Set Continue = false
Else
Display "Do you want jelly on your sandwiches?"
Input IncludeJelly

If IncludeJelly = “Yes”
Display “What type of jelly; Grape or Strawberry?”
Input TypeOfJelly
EndIf

**** Students – add a loop here to create the number of sandwiches requested by the user – within the loop you need to invoke (call) the SandwichModule to create the sandwiches. Do not over think this one; the loop should loop over the NumberOfSandwiches and reduce the value each time a sandwich is made until NumberOfSanwiches is equal to zero.

Make sure you review the given code in this assignment, you do not want to repeat steps that are already done.

EndIf

End InputModule

SandwichModule

**** Students – add decision control structure here to add jelly to the sandwich if the user requested it. Hint: you will want to use a nested decision control structure.

End SandwichModule

## Similar Questions

1. ### Programming

I need your help to write a program using visual basic 2010 for the following:- write a program that calculates the average of up to 50 numbers input by the user and stored in an arrey. The program should use a class named Statistics …
2. ### statistics

the average marks for statistics in a class of 30 were 52. the top six students had an average of 31 marks. what were the average marks of the other students?
3. ### programming

user to enter the student’s marks on four exams (use double and one exam is over 20). The Write a program that asks the program should display the four exam’s marks, the sum and the average.(Use also the header file iomanip)
4. ### programming c

Write a c program that will declare two dimensional array called of 5 row and 5 colum. The user will enter student marks for 25 student caculate and print the minimum and maximum average marks those students.
5. ### computers

write a c program to find the percentage marks where obtain marks and total marks is given by user also show the fail message if marks is less than 17%
6. ### introduction to computing

Write a C++ program that will accept the marks in a test for a group of 25 students then calculate and display the average mark and highest marks in class.
7. ### science computer

The program will accept the final marks of a group of students in a class. The lecturer can choose '1' to finds the highest and lowest marks in the class. The lecturer choose '2' to find the average marks of that class. If user enter …
8. ### science

A program that will calculate average marks for five students using multi dimensional array in vb
9. ### programming

Example Develop a pseudocode algorithm for a program that accepts each of the average marks of 10 students in a class and computes the sum and the average mark of the class. The program should display the average mark of the class. …
10. ### Maths

There are fifty students in a class. In a 100 marks exam, 20 students scored less than 30 marks, 5 students scored more than 70 marks and the remaining scored between 30 and 70 marks. If passing score is 55 marks and 40% students have …

More Similar Questions