Make three arrays of 20 integers each

Assignment Help Computer Engineering
Reference no: EM1331621

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: EM1331621

Questions Cloud

The collapse of centrally planned economies : Discuss the four factors that contributed to the collapse of centrally planned economies.
Describe examples of ethical problems : Health care providers are obligated to provide for those entrusted in their care. To what extent do they meet this obligation? How might their obligation to others conflict with their obligation to themselves?
Reduce the risk of loss from natural or unnatural disasters : What should a company do to make sure their data is in enough disperse locales to reduce the risk of loss from natural or unnatural disasters?
Difference between a forensic accountant and an auditor : What is the difference between a forensic accountant and an auditor? What do they have in common and what do they do that is different from each other?
Make three arrays of 20 integers each : Create 3 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 value of each array element and store it in the third.
Describe the maximum insurance premium : Describe the maximum insurance premium that the individual is prepared to pay.
Compute utility function that corresponds to a constant : Compute utility function that corresponds to a constant Arrow-Pratt measure of absolute risk-aversion.
Find the primary assets held by the company : Using Target Corporation's 2010 Annual Report, Find the primary assets held by the company?
Make use of a stack for the infix to postfix conversion : comprise a README file describing how to run your program and give an example.make Use of a stack for the infix to postfix conversion.

Reviews

Write a Review

Computer Engineering Questions & Answers

  What security suggestions does laptop follows

explain to Andersen & Sons how they might create a security template and some useful settings. What security suggestions do you have to secure communications from Human Resources server to the Payroll server.

  Produce two random integer numbers between 1 and 200

Produce two random integer numbers between 1 and 200.

  Problems on microcomputer applications for management

problems on Microcomputer Applications for Management.

  Express the advantages of joining two tables

express the advantages of joining two tables.What is the inner join and what is outer join? Please give me some real applications of joins.

  Visual logic assignment

Write down a program having a procedure that draws a shape of your choice. The program must call the procedure 10 times in order to draw the shape at 10 random locations.

  Create an application for a furniture company

Write down an application for a furniture company; the program determinds the price of a table, Ask the user to choose 1 of pine, 2 of oak, or 3 of mahogany.

  How many register windows must be saved to memory

How many register windows must be saved to memory.

  Program requires to check the current disk drive and report

program requires to check the current disk drive and report.

  Write a report on how to used them

For several of the commands, you require to practice them on some files.

  Wan technologies for mobile user-to-office

WAN technologies for each of the Wilke’s three connectivity situations: mobile user-to-office, office to office, and home-to-office.

  Generating ten random permutations

Write down a program which generates ten random permutations of numbers 1 to 10. To produce a random permutation, you require filling a vector along with the numbers 1 to 10 so that no two entries of vector have the same contents.

  Program to print a sequence of 20 random die tosses

Write down a program which produces a sequence of 20 random die tosses in an array and which prints the die values.

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