Input parameters, and returns nothing

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

C++ codes only.

1. Write a function called ten2one(), that takes no input parameters, and returns nothing (void). The body of the function must include a loop that counts from 10 down to 1, printing the count value each time in the loop. The output should look like (notice the spacing): 10 9 8 7 6 5 4 3 2 1 Call this function from main().

2. Write a function called hundredByFives() that takes no input arguments and returns nothing. The body of the function must include a loop that counts from 5 to 100 by fives, printing the count in each iteration. The output should look like: 5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100 Notice the commas. Notice that there is no comma at the beginning or end. That means that you must do something special either at the beginning or at the end. The easiest solution is to do something special at the beginning.

3. Write a function called countDown() that takes an integer parameter as input but returns nothing. (Takes an integer parameter"means declare an int variable between the parens of the function, and put a value between the parens when you call it. It does not mean put a cin in the function.) The body of the function should count down, starting with the number that was passed and ending with 0. Call this function from main, twice, each time with a different value.

4. Write another function called countUp(), like countDown(), that also takes an integer parameter but starts at 1 and counts up to the number that was passed.

5. If you have not already done so, output a new line after each function call so that each function outputs on its own line (as opposed to everything appearing on one very long line).

Reference no: EM13159355

Questions Cloud

Position on freedom of speech : State your own position on Freedom of Speech on the Internet and offer a defense for it. Using the Ethical Dialectical Process of Thinking state what your ethical position would be on the moral question or dilemma or situation and why.
Explain why exercise reduces the amount of insulin : Explain why exercise reduces the amount of insulin required to transport glucose into cells? (Citation and source of info recommended)
Methods of encouraging growth : Which of these methods of encouraging growth would you suggest for the typical company in Hong Kong and Singapore? Explain the rationale for your choice.
Effective annual interest rate helen is paying is most near : The down payment is paid immediately, and the monthly payments are due at the end of each month. The effective annual interest rate Helen is paying is most nearly?
Input parameters, and returns nothing : Write a function called ten2one(), that takes no input parameters, and returns nothing (void). The body of the function must include a loop that counts from 10 down to 1, printing the count value each time in the loop. The output should look like (no..
Find probability that no one has done a one-time fling : About 10% of all adults deliberately do a one-time fling and feel no guilt about it. In a group of 7 adult friends, what is the probability that: No one has done a one-time fling.
Most dangerous place in the world : What is the most dangerous place in the world? Why does it have this reputation? How does this situation affect its neighboring states? Be specific and include the effect does the US's involvement have on this situation.
How would you set up a forecasting model : What would happen to the demand curve if the major taxi companies lowered their prices? If you were asked to forecast future demand for this firm, how would you set up a forecasting model?
Effect on the price and quantity of minivans : Consider the market for minivans. For each of the events listed here, identify which of the determinants of demand or supply are affected. Also indicate whether demand or supply increases or decreases. Then draw the diagram to show the effect on t..

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