Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++- Please solve TODO sections and match sample output. // Demonstrates repeated use of a simple function #include #include using namespace std; // TODO: Write

C++- Please solve TODO sections and match sample output.

// Demonstrates repeated use of a simple function

#include

#include

using namespace std;

// TODO: Write function prototype here. This function should be:

// Name: PrintStarLine

// Parameter(s):

// Returns:

//-----------------------------------------------------------------------------

int main()

{

/* TODO: Call (invoke) the function where necessary to

produce output as shown in sample (below).

NOTE: You will need to break-up this long output

statement into at least 3 separate output statements.

*/

cout << " Simple C++ Integer Types" << endl

<< " (Microsoft Specific)" << endl

<< "Data type Range" << endl

<< "char: " << setw(20) << CHAR_MIN << " to " << CHAR_MAX << endl

<< "short:" << setw(20) << SHRT_MIN << " to " << SHRT_MAX << endl

<< "int: " << setw(20) << INT_MIN << " to " << INT_MAX << endl

<< "long: " << setw(20) << LONG_MIN << " to " << LONG_MAX << endl;

return 0;

}

//-----------------------------------------------------------------------------

// PrintStarLine()

// prints 45 stars on one line (using asterisk *)

// TODO: Write function definition here.

//-----------------------------------------------------------------------------

/* Sample program output:

*********************************************

Simple C++ Integer Types

(Microsoft Specific)

*********************************************

Data type Range

*********************************************

char: -128 to 127

short: -32768 to 32767

int: -2147483648 to 2147483647

long: -2147483648 to 2147483647

*********************************************

*/

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Describe what is the OSI network model

Answered: 1 week ago

Question

Management style: Fair, consistent? Or plays favorites?

Answered: 1 week ago

Question

LO6 Summarize various ways to manage retention.

Answered: 1 week ago

Question

LO3 Define the difference between job satisfaction and engagement.

Answered: 1 week ago