Question

C++ // This program prints the proverb // "Now is the time for all good men...

C++
// This program prints the proverb
// "Now is the time for all good men to come to the aid of their party"
// in a function (procedure) called writeProverb that is called by the main function

// PLACE YOUR NAME HERE

#include <iostream>
using namespace std;

void writeProverb();    // This is the prototype for the writeProverb function 

int main()
{
        // Fill in the code to call the writeProverb function

        return 0;
}

//*********************************************************************
//      writeProverb
//
//      task:     This function prints a proverb
//      data in:  none
//      data out: no actual parameter altered
//
//********************************************************************

// Fill in the function heading and the body of the function that will print
// to the screen the proverb listed in the comments at the beginning of the
// program
0 0
Add a comment Improve this question Transcribed image text
Answer #1
// This program prints the proverb
// "Now is the time for all good men to come to the aid of their party"
// in a function (procedure) called writeProverb that is called by the main function

// PLACE YOUR NAME HERE

#include <iostream>
using namespace std;

void writeProverb();    // This is the prototype for the writeProverb function

int main()
{
    writeProverb();
    return 0;
}

//*********************************************************************
//      writeProverb
//
//      task:     This function prints a proverb
//      data in:  none
//      data out: no actual parameter altered
//
//********************************************************************

// Fill in the function heading and the body of the function that will print
// to the screen the proverb listed in the comments at the beginning of the
// program
void writeProverb() {
    cout << "Now is the time for all good men to come to the aid of their party" << endl;
}

Add a comment
Know the answer?
Add Answer to:
C++ // This program prints the proverb // "Now is the time for all good men...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • C++ Type in the above program . Before running the program, change each of the question...

    C++ Type in the above program . Before running the program, change each of the question marks to the numbers 1 through 5 indicating the order in which that line will be executed. Run the program and check your numbers. Fix and rerun if necessary. Submit the program and the output. #include <iostream> using namespace std; //prototypes void DemonstrateProc1(); void DemonstrateProc2(int num); int main() { cout << "?. Execution starts with main. " << endl; DemonstrateProc1();       cout << "?....

  • Consider the following program that reads a number of nonnegative integers into an array and prints...

    Consider the following program that reads a number of nonnegative integers into an array and prints the contents of the array.   Complete the missing parts, add new function prototypes and function definitions, and test the program several times. Add the following to the program: Write a void function that prints the list of nonnegative integers in reverse. Write a void function that prints all the numbers stored in the list that are greater than 10. It will also print the...

  • Modify the program below by replacing the function prototype "void getScore(int& score);" with "int getScore();" You...

    Modify the program below by replacing the function prototype "void getScore(int& score);" with "int getScore();" You need to modify other part of program according to this change. //This program reads a course score and prints the //associated course grade #include <iostream> using namespace std; void getScore (int& score); void printGrade (int score); int main () int courseScore; cout << "Line 1 Based on the course score, n" <<"this program computes the" <"course grade." << endl; getScore (courseScore); printGrade (courseScore); return...

  • C++ Recursion Code a function which displays the first n prime numbers. The prototype is: void...

    C++ Recursion Code a function which displays the first n prime numbers. The prototype is: void prime (int) The number of primes to display is passed as the parameter. The function prime itself is not recursive. However, it should call a separate recursive helper function which determines if a given number is prime #include <iostream> using namespace std; void prime(int ) { } int main() {    prime (21);    return 0; }

  • This program has an array of floating point numbers as a private data member of a...

    This program has an array of floating point numbers as a private data member of a class. The data file contains floating point temperatures which are read by a member function of the class and stored in the array. Exercise 1: Why does the member function printList have a const after its name but getList does not? Exercise 2: Fill in the code so that the program reads in the data values from the temperature file and prints them to...

  • Give the output of the following C++ program and explain your reasoning: #include <iostream> using namespace...

    Give the output of the following C++ program and explain your reasoning: #include <iostream> using namespace std; int gcd( int , int ); //Function prototype int main() { int a = 105; int b = 30; cout << “The GCD of “ << a << “ and “ << b << “ is “ << gcd(a,b) << endl; return 0; } int gcd(int a, int b) { if ( b == 0 ) return a; else return gcd(b,a%b); }

  • 61. The following program is accepted by the compiler:         int sum( int x, int y...

    61. The following program is accepted by the compiler:         int sum( int x, int y )         {             int result;             result = x + y;            }                            T__   F__ 62. The following implementation is accepted by the compiler:         void product()         {             int a; int b; int c; int result;             cout << "Enter three integers: ";             cin >> a >> b >> c;             result = a * b * c;            ...

  • 5. (7 pts) What wil display on the output screen after following program is executed? includeciostream...

    5. (7 pts) What wil display on the output screen after following program is executed? includeciostream using namespace std int b 40 int A function(int a) int main (void) int c 7, b 15 cout<cA function (e) <cendla return 6 int A function (int a) int i cout<<b<<endl; if (a>-0) else return i i-ai i--ai Ans5 6. (7 pts) Show what will appear on the output screen after the following program is executed tincludeciostream> using namespace std; void A function...

  • read in numbers into array , print out, sort - my program reads in and prints...

    read in numbers into array , print out, sort - my program reads in and prints out but crashes before the sort - crashes after it prints out the scores - *important I have to use pointers!!!! c++ #include <iostream> using namespace std; void sortarray(int *tarray, int ); void displayarray(int *[], int); void averageshowarray(int *[], int); int main() {     int Size;     int count;     cout << "enter the size: " << endl;     cin >> Size;     int...

  • A) One of the problems that have been discussed in the class is to write a simple C++ program to ...

    C++ programming question will upvote A) One of the problems that have been discussed in the class is to write a simple C++ program to determine the area and circumference of a circle of a given radius. In this lab you will be rewriting the program again but this time you will be writing some functions to take care of the user input and math. Specifically, your main function should look like the following int main //the radius of the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT