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

  Write a menu-driven program that maintains an address book

Write a menu-driven program that maintains an address book using a linked list. The address book must supports the following operations

  Write a program to crypt its input accordingly

Write a program to crypt its input according to a specified transformation scheme

  Program to compute surface area of sphere using function

Write down a program in C++ to compute surface area of sphere using a function. As sample run, write down the surface areas of spheres with radii.

  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.

  Write a program that will be used to gather statistical data

Write a program that will be used to gather statistical data about the number of movies

  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

  C assignment of curl library

C Assignment Curl library must be used To be done on linux, it should be compiled using the following command: gcc -Wall -ansi -pedantic NameOfFile.c -lncurses Please make sure it is commented with clarification Variable names in camel case

  Allows the user to enter the coefficients for a system

Create a graphical (not text-based) Visual C++ program that allows the user to enter the coefficients for a system of four equations with four unknowns. Include a button that when clicked, will solve the system of equations and display the results in..

  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 count occurrences() function that accepts a string

Write a CountOccurrences() function that accepts a string to be searched and a sub-string to be found. The function should return the # of times the sub-string is found. Write a tester file that declares a secret sentence as a constant.

  Create a text adventure game that uses pointers

Create a text adventure game that uses pointers. You have a rich, eccentric Uncle Billy who is soon to be deceased.

  Convert celsius temperatures to fahrenheit temperatures

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

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