Write a program that will store 10 integers into an array

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

C++ question, using xcode on a Mac. Must use an array and a function.

Write a program that will store 10 integers into an array. Only accept integers between -100 and 100. Display those integers. You must then square those integers by CALLING A FUNCTION to square each individual integer. That function must be called, square() and its only parameter should be the integer that you want to square. Display those integers in reverse order. Please note  that you may only have one array. You must then take the total of the squared  integers and get the average. Here is a sample run.

The ten numbers entered are: 

1 2 3 4 5 6 7 8 9 10 

Those same numbers squared in reverse order are: 

100, 81, 64, 49, 36, 25, 16, 9, 4, 1 

The total of the squared numbers is: 385 

The average of the squared numbers is: 38

Reference no: EM13815680

Questions Cloud

External state that supplies information to sensory system : the decision-action process, not self-contained representations of some external state that supplies information to the sensory system
Discuss the treatments or interventions : Discuss the treatments or interventions
Have you observed situations where an employee was fired : Should the law allow an employer to fire an employee without a good reason? Conduct research to provide examples to support your position and use your own personal employment experiences when possible. Have you observed situations where an employe..
Discussion on integrating pharmacotherapy in treatment : Discussion-Integrating Pharmacotherapy in Treatment
Write a program that will store 10 integers into an array : Write a program that will store 10 integers into an array. Only accept integers between -100 and 100. Display those integers. You must then square those integers by CALLING A FUNCTION to square each individual integer. That function must be called, s..
Characteristics of an executive information system : What are the distinguishing characteristics of an executive information system (EIS)? Why have these systems become a part of business intelligence in many companies?
Example of inductive logic : Identify an operational definition used by the researchers. Provide one example of inductive logic and one example of deductive logic presented in the results. Identify whether the research study is a quantitative or qualitative design. Explain your ..
Technological pedagogical content knowledge : Technological Pedagogical Content Knowledge
Calculate the price and profit of each firm : The market demand is P=100-1.5Q and marginal & average costs are constant at 10 (MC=AC=10) find the monopoly price and quantity. Find the perfect competition price and quantity. Calculate profit, social welfare (consumer and producer surpluses), and ..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a function that finds area and volume of a cube

write a function that finds area and volume of a cube when length is input and then write a program to test it. here is what i have so far.

  Write a function called distance

Write a function called distance that takes two Points as arguments and returns the distance between them.

  Prompt the user for and read 6 numbers

Write a program using an array that will store input data. Prompt the user for and read 6 numbers between 70 and 90. Verify the numbers should be greater than 70 and less than 90. If the number is less than or equal to 70 or greater than 90, repro..

  Calculate and display the number of units of electricity

The manager of PG&E wants a program that calculates a customer's electric bill. He will enter the current and previous meter readings.

  Write a program that find the average time spent programming

Write a program that finds the average time spent programming by a student each day over a 3 day period.

  Program that reads source file

For this assignment you will write a program that reads a source file, edits the file based on a second file containing commands, and then saves the resulting text to a third file. You will find my executable and test files in ~davis/40/p7.

  Create the logic program

Create the logic for a program that accepts input values for the projected cost of a vacation and the number of months until vacation. Pass both values to a method that displays the amount you must save per month to achieve your goal.

  Optimization is to add a sorting algorithm

The second optimization is to add a sorting algorithm. Each time you add an item to the array (from disk or from keyboard), you call a function called SortMyArray(), which use the bubble sorting algorithm to sort the array in the ascending order, ..

  Basics of code development on linux and cryptography

Prepare a C program that gives simple mono-alphabetic substitution between plaintext, and Enhance your code to use "-e" to encrypt a string argument and "-d" to decrypt it using argv and argc

  Loop statments

Weekly tasks or assignments (Individual or Group Projects) will be due by Monday, and late submissions will be assigned a late penalty in accordance with the late penalty policy found in the syllabus.

  Add the correct code to fill the matrix array with the value

Use the file below code and add the correct code to fill the matr2 array with the values that make it the matrix transpose of matr1. There are many examples on the Internet that show how to do this in C++ and what it should look like when it is corre..

  Program that takes a number between

Write a program that takes a number between -121 and 121 and output that number in the format of power of 3 (1,3,9,27)example:13 = 9+3+1

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