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

  Irrespective of the old ui

Generate a Drag and Drop UI, where the enduser can change UI elements by dragging and dropping then later when the same user again comes and access the UI then what the changes he made on UI earlier should be presented there irrespective of the ol..

  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 c program that reads n positive numbers from the

write a c program that reads n positive numbers from the keyboard calculates and displays the following information.a.

  Use a define statement to create a constant

Follow these specifications: Use a define statement to create a constant that will hold your student number. You should have separate string variables for your first and last name; name these first_name and last_name.

  What are some of the benefits of modularity

What are some of the benefits of modularity and what is functional abstraction and what is information hiding

  Write a program to manipulate strings using pointers

Write a program to manipulate strings using pointers. The program will start out by displaying a menu to ask user what to do as shown below

  A series of one-digit non-negative numbers

Write a program that asks the user to enter a series of one-digit non-negative numbers

  Write a program using a function and a series

Write a program using a function and a series of if...else statements - You may decide to limit the number entered by the user to a particular range. Make sure to prompt the user with this range, so you can deal with correct and incorrect numbers e..

  Estimated number of copies that will be sold

Write a program that prompts the author to enter the net price of each copy of the novel and the estimated number of copies that will be sold.

  Use c program language and should work on linuxcomputers

use c program language and should work on linuxcomputers are frequently used in check-writing systems such as payroll

  Source code of the existing software

The development team of SoftSols Inc. analyzes the source code of the existing software and notes the following observations:

  Function that returns the height of a binary tree

Write a function called getHeight() that returns the height of a given binary tree - CptS 122 Write a function called countSmallerThan() that returns the number of nodes whose values are smaller than the supplied input paramter

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