All numbers-odd numbers and even numbers

Assignment Help Basic Computer Science
Reference no: EM132526712

Write a program that reads a list of 10 integers from a file or use a list defined by the programmer (hard coded). Then the program calculates the total and average for the following numbers: all numbers, odd numbers, and even numbers, and displays the results to screen.

Ask the user if he/she wants to read the numbers from a file. If the user choose not to use a file, then use a array of 10 integers in the body of your code. Ex. a[10] = { 3, -2, 0, ... }

If the user wants to read the values from a file, ask for the file name, and input the content of the file (10 integers) into an array before doing your calculations.

Reference no: EM132526712

Questions Cloud

How does the affect normal success criteria : How does that affect normal success criteria? Is it fair to judge a project with a critical completion date by normal project success standards?
Create matrix of requirements with pass-fail criteria : Create a matrix of requirements with pass/fail criteria based on the organizations framework controls.
What is the amount that will be credited to the Sales Tax : The company is required to collect sales taxes amounting to 10%. What is the amount that will be credited to the Sales Tax Payable account
What volume will the gas occupy at 70 kpa : A gas at 80 kPA occupies a volume of 5 mL. What volume will the gas occupy at 70 kPa?
All numbers-odd numbers and even numbers : Then the program calculates the total and average for the following numbers: all numbers, odd numbers, and even numbers, and displays the results to screen.
How much cold water should be added to the hot tea water : How much cold water should be added to the hot tea water? (Hint: the density of tea and water is 1 g/mL and the specific heat of tea and water is 4.184 J/g·°C).
Discuss how the firm could overcome that problem : Select a problem that a firm might have bringing out a new product or service and discuss how the firm could overcome that problem.
Industry experts believe blockchain is technology : Industry experts believe blockchain is a technology that has the potential to affect the business of most IT professionals in the next five years.
What is the total pressure of the gases in the container : A container has hydrogen, helium and argon gas contained within it. What is the total pressure of the gases in the container if the partial pressure of hydrogen

Reviews

Write a Review

Basic Computer Science Questions & Answers

  How does it guarantee serializability

What is the two-phase locking protocol?

  Basic techniques and technologies

Briefly define the following basic techniques and technologies that represent recentrelated advances in computer architecture, parallel processing, distributed computing, Internettechnology, and information services:i.High-performance computing (H..

  Which countries are referred to as andean

How does the economic importance of cocaine made it difficult to come back illegal drugs in the US and around the world?

  Reasons for passage of us affordable health care act

What were the major reasons for the passage of the US Affordable Health Care Act (Obama Care)? What are the arguments against the Health Care Act?

  Describe the angular velocities of links bc

Determine expressions for the velocity and acceleration of points D and A. Express the equations for solutions of your unknowns in matrix form

  Preserving most of the interesting rules

Name at least one effective method that can be used to reduce the number of rules generated while still preserving most of the interesting rules.

  Impending reduction in workforce impending

Impending Reduction in Workforce Impending Reduction in Workforce Create a Microsoft PowerPoint presentation, consisting of 10- to 12-slides, outlining the elements required to create a memo that informs staff in an accurate manner of an impending..

  Threat information whether physical or technological

You are to look at datasets that relate to threat information whether physical or technological.

  Elements in a one million-element vector

An SMP UMA system contains 64 processors and is to compute a running sum by adding all of the elements in a one million-element vector. Each processor takes one cycle to perform a single addition. How many cycles would it take just to do the requi..

  Describe the relationship between mathematical relations

Database mprocessing management - Describe the relationship between mathematical relations and relations in the relational data model.

  Dbas formulate database policies

DBAs formulate database policies, communicate these policies to users, and enforce them. These policies include: access privileges, security, disaster planning.

  What is meant by the globalization of markets

What is meant by the 'Globalization of Markets, provide example derives from telecommunication industry

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