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

  Calculate the net pay as the gross less the taxes

Design and code a new function that accepts as parameters the gross pay by value and the federal tax, state tax, local tax, SS tax, and net Pay by reference.

  Computer programming techniques

Construct a program from a design and use appropriate functions

  Show the deatils of an emplyoee - c programming

Show the deatils of an emplyoee in a neat format.

  Design a nested program

How many levels of nesting are there in this design?

  Write application to calculate price of carpeting for room

The Westfield Carpet Company has asked you to write an application that calculates the price of carpeting for rectangular rooms.

  Program to print out invalid number to character

The integer must contain 3 distinct non-zero number, or the program will print out invalid number.it should print out invalid query.

  Write a program using vectors and iterators

Create a program that uses at least two functions that will be called from your main. This program is a number game program that asks for parts of your phone and after manipulating it mathematically, eventually outputs your entire phone number. The d..

  Create class having constructor to recieve two ints

Create a class (in C++)named Card. The class should have two int data members named face and suit.The class should have a constructor that recieves the two ints and uses them to initialize the data members.

  C program to randomly generate more than ten ip address

Write C or C++ program which Randomly generates more than 10 IP addresses written in decimal format and write results in text file (e.g. Dec_IPAddresses.txt)

  Skills required by personnel working in information security

What skills are required by personnel working in information security? Write down some job titles in the field and come up with some required qualifications and some desirable qualifications.

  If a class is derived protected

If a class is derived protected from a base class, explain how this affects the inheritance of all public, protected, and private members of the base class by the derived class.

  Complete the design and implementation

Complete the design and implementation of the class customerType defined in the Programming Example Video Store. b. Design and implement the class customerListType to create and maintain a list of customers for the video store.

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