Program that will read in 8 numbers into an array

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

Question:  you need quick help completing these three programs in c++ language.

Question 1. A team consist of 3 players. The total weight of a team must be less than 350 pounds. Read in the weight of 3 people, print out each person's weight and the total weight of the team and if the team weighs 350 pounds r less. Your program should work for any number of lines of data.

Question 2. Our store wants to triple its price, but we do not want a price to be over 500.Read in a price and print out the price, the price tripled and if tripled the price is more than 500 or not. Your program should work for any number of lines of data.

Question 3. Write a program that will read in 8 numbers into an array. Print out the numbers from the array, then print the 2nd number, the 5th number and the last number.

It must compile with no errors and follow the directions.

Reference no: EM13691704

Questions Cloud

Write a c function to find the norm of a matrix : Write a C function to find the norm of a matrix. The norm is defined as the square root of the sum of squares of all elements in the matrix. Write your own code please.
Create a database to control its local libraries : A county wishes to create a database to control its local libraries. Each library has a number of employees, one of whom is designated as the manager of the library and is responsible for supervising employees and the general day-to-day management..
Suggest three ddl and three dml commands : Describe a specific scenario, situation, or application where using a foreign key would be necessary and explain your reasons, including the characteristics of the data, that necessitate the foreign key.
Problematic programming situation : Suggest one example of a problematic programming situation or scenario that the use or implementation of a loop structure could resolve. Justify your response.
Program that will read in 8 numbers into an array : Write a program that will read in 8 numbers into an array. Print out the numbers from the array, then print the 2nd number, the 5th number and the last number.
Write a method compact that removes all zeroes : Write a program that reads a text file (compact.txt) and stores the integers in an array.  Your instructor will provide this text file.
Write a program which initialize an integer array : Write a program which performs the tasks - return the control to main( )and print the new array elements in main.
Steps in preparing a high level language program : Describe the purpose of each step in preparing a high level language program for execution (editing, compiling, linking, and loading).  Include in your description the types of files created with each of the first three steps.?
Give an algorithm that returns the position : Give an algorithm that returns true if a string contains properly nested and balanced parentheses, and false if otherwise. Hint: At no time while scanning a legal string from left to right will you have encountered more right parentheses than left..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Use gets() to input the user name into name

Use strcpy() and strcat() to build the anwer into fullname that consists of.

  Write a program that calculates the user''s bmi

Write a program that calculates the user's body mass index (BMI) and categorizes it as underweight, normal, overweight, or obese, based on the following table from the United States Centers for Disease Control

  Design a nested program

How many levels of nesting are there in this design?

  Create a program for a company named retail-mart

Prompt the user to enter an item name (one word only), a quantity and a price. For this step, in addition to functionality, I'll be looking at: location of the variable declarations; appropriateness of data types selected; appropriateness of the va..

  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

  Write a program that prompts the user to input

One metric ton is approximately 2205 pounds. Write a program that prompts the user to input the amount of rice, in pounds, in a bag. The program outputs the number of bags needed to store one.

  Implement a second-order low-pass filter

Implement a second-order low-pass filter using the finite difference method. The finite difference method is a useful mathematical method that is used to numerically solve differential equations.

  Find the pairs in any given matrix

write a c program which will find the pairs in any given matrix, whose sum of pairs are 10.

  Describe an example application of polymorphism

Provide and describe an example application of polymorphism that could be used in a program solution. List and describe the class relationships.

  Searching f and removing certain states from the hash table

use the class hashT, ''Hashing: Implementation Using Quadratic Probing,'' which uses quadratic probing to resolve collision, to create a hash table to keep track of each state's information. Use the state's name as the key to determine the hash addre..

  Counts the number of numbers between 150 and 200

create a program that counts the number of numbers between 150 and 200. This is what I have so far, but it's not working. It is an array of 500 number, I did not include the array because of obvious reasons.

  Define a function named average grade

Define a function named average grade. This function returns a double and has four double arguments, testi, test2, test3, test4. The return value should be the average, or arithmetic mean of the four arguments.

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