Design and run a program that takes a numerical score

Assignment Help C/C++ Programming
Reference no: EM13936861

1 Create three arrays of 20 integers each. Fill in two arrays with data, leaving the third blank. From main, pass these three arrays into a function. Inside the function, add the value of each array element and store it in the third.
third_array[i] = second_array[i] + first_array[i]

Back in main, print out the value of every element in the third/sum array. Excellent output on this assignment might show something like:
Array 1 + Array 2 = Array 3
5 + 3 = 8
10 + 4 = 14
etc.

2. Design and run a program that takes a numerical score and outputs a letter grade. Specific numerical scores and letter grades are listed below:
90-100 = Grade A
80-89 = Grade B
70-79 = Grade C
60-69 = Grade D
0-59 = Grade F

In this program, create two void functions titled getScore and printGrade with an int argument. The function getScore should have a Reference parameter and printGrade should have a Value parameter.

The function getScore will prompt the user for the numerical score, get the input from the user, and print the numerical score. The function printGrade will calculate the course grade and print the course grade. (Be careful and note that the assignment requires you to input the grade into getScore and not directly into the main function.)

Do not forget to put in the proper prompts and appropriate output messages. (Note: This program is a natural for use of the switch command, but if?else structures will also work.)
3. Write a program that includes the following four steps:
Step 1.Create a structure with the name StudentRecord containing a Name stored as an array of 20 characters, an ID stored as an integer, and a GPA stored as a floating-point number. Create (instantiate) a variable from StudentRecord called TESCStudent.

Step 2. Assign the following values to the variable by assuming Name is SuperProgrammer, with an ID of 1234, and a GPA of 4.0.

Step 3. The program should print out on the screen that SuperProgrammer with an Identification number of 1234 has a 4.0 GPA. (Of course, your program needs to use the structure you defined in step 1.)

Step 4. Generalize the program so that you can input the student's name, ID, and GPA when the program is run. Please do not forget to include prompt statements in your program. Print out the user entered Name, ID, and GPA.

Make sure your program includes all four steps, not just steps 1 and 4.

4. Define a class called Plot that has private members of length and width. Include a constructor and a public function that calculates the area and the length of the boundary of the field. Use public functions in a program that computes and displays the area and the length of the boundary of the plot where the length and width are 7 and 9 respectively. Hint: The length of the boundary is 2 * (length + width).

Reference no: EM13936861

Questions Cloud

Memory segment in terms of its start address : The above segment descriptor describes a memory segment in terms of its start address, its size and whether it is ALLOCATED or FREE. This descriptor is part of a list (contains a pointer to next segment descriptor). Initially, there is only one se..
Calculate keep-kools total ordering and carrying costs : Calculate Keep-Kool's total ordering and carrying costs using EOQ. Assume that demand is uniform throughout the year and is known with certainty.
Concepts of sct to an environmental health behavior : For this Discussion, you apply the concepts of SCT to an environmental health behavior. You may choose one of these examples or your own topic: recycling; responsible energy use (e.g., compact fluorescent [CFL]/light-emitting diode [LED] lightbulb..
Briefly described the product purchased : 1) Briefly described the product purchased. For example, what was the model, any special features, exact cost, etc.
Design and run a program that takes a numerical score : In this program, create two void functions titled getScore and printGrade with an int argument. The function getScore should have a Reference parameter and printGrade should have a Value parameter.
Managerial decision making research and analysis : Research a specific company of your choice and identify some of the managerial decisions that were made over time and in response to changes in its market or competitive environment. Use the Ashford University Library and web-based sources for your r..
Attribute confers a bonus or penalty : Each class should weight each attribute from most to least important. In Method IX, the most important attribute rolls 9d6 and keeps the highest 3. The second most important rolls 8d6, keeping the highest 3. This follows in this pattern of 7d6, th..
Calculate changes costs if he purchases paper from papyrus : Calculate changes costs if he purchases paper from (a) Papyrus and (b) Suffolk Leaves. Which supplier should Manraj choose only on the basis of the financial numbers given in the problem?
Program to modify double linked list : Modify Double Linked List code to include following index based access operations.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Using opengl to create a cube

Write a program in C/C++ using OpenGL to create (without using built in function) a cube by implementing translation algorithm by translating along 1. X-axis, 2.Y-axis and 3. X and Y plane

  Prepare a businesspartner

Prepare a BusinessPartner class that contains a company name, first name and a telephone number.

  Demonstrate overriding of their getter and setter methods

Organize following animals using classes and virtual function. tigers,crocodile, elephants,pythons,zebras,hawks, chickens,rabbits using at least 3 properties some of the animals share. demonstrate overriding of their getter and setter methods.

  Write a program that calculatesand displays the distance

Distance per Tank of GasA car with a 20-gallon gas tank averages 21.5 miles per gallon when driven in townand 26.8 miles per gallon when driven on the highway.

  Write a function named concatenate

If the function discovers that the number of cells in the large array is not large enough to hold all the numbers to be copied into it, then the function should return 0 to indicate failure.

  Include a main function that will solicit

Include a main function that will solicit a DNA sequence string from the user, call the genes function to obtain all the genes in the sequence and print each one on the console display

  Define write a c program to calculate the total running time

Write a C program to calculate the total running time for a collection of songs. The user enters the running times in the form 5:08 (five minutes and eight seconds), and enters 0:00 to indicate the end of input. (It is also valid for the data to r..

  Explain the use and benefits of object-oriented programming

Explain the use and benefits of object-oriented programming and event-driven programming

  Create a function in c++ that subtracts two vectors

Create a function in c++ that subtracts two vectors. The function returns a vector than can also be negative.

  Write an algorithm to compute the volume of water

Write an algorithm to compute the volume of water in cubic feet, flowing through a pipe of diameter d in feet, with a velocity of v feet per second.

  What is printed by the following program

What is printed by the following program?

  Which of the following is a pure abstract function

Which of the following is a pure abstract function?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd