Program that contains two functions in addition to main

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

Question: Write a program that contains two functions in addition to main. The first one takes 2 arguments (an int array and an int) and returns nothing. 

It prints the entire contents of the array argument, one element per line.

You MUST use a for loop to print the array contents. The second function takes 1 argument (an int) and returns a bool indicating whether or not the argument was even or odd. 

Be sure and include prototypes for your functions.

    Your main function should:

Declare an int array of size 3.

Prompt the user for the contents of each array element. Store each input in the array that you declared in Step 1. The user prompt and assignment statements MUST be inside the body of a for loop.

Call the first function that prints an array, passing it the filled array and the array size.

Repeatedly call (using a for loop) the second function each time passing it a different element in the array until all elements have been passed.   Based on the return value of the function, display a message like: " ______ is odd" or "_____ is even"

You need to make well-formed and clean code. You should not copy and paste the code from other source.

Reference no: EM13693287

Questions Cloud

Find the concentrations of x and y in a solution : Find the concentrations of X and Y in a solution
Prepare necessary ledger accounts : Prepare necessary ledger accounts in the books of both thep arties .also show how the consignment stock will appear in the balance sheet.
What is the clinic''s average net float : On a typical day, Park Place Clinic writes $1,000 in checks. It generally takes four days for those checks to clear. Each day the clinic typically receives $1,000 in checks that take three days to clear. What is the clinic's average net float?
Program that prompts the user to enter the mass of a person : Write a program that prompts the user to enter the mass of a person in kilograms and outputs the equivalent weight in pounds.
Program that contains two functions in addition to main : Write a program that contains two functions in addition to main. The first one takes 2 arguments (an int array and an int) and returns nothing.
Draw the ms visio crows feet e-r model : 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..
Performance measurement guide to information security : Performance Measurement Guide to Information Security. Using this document, identify five measures you would be interested in finding the results from based on your home computing systems and/or network.
Making a query to produce all clients for one of the sales : Making a query to produce all clients for one of the sales that are assigned to multiple clients - Produce a full client list by each sales person.
Write a program to track hourly employee arrival : A company hires you to write a program to track hourly employee arrival and departure times from work. In essence, you are tasked to make an online time clock - If the user enters an incorrect value more than 3 times, display a prompt that the prog..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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