Write the C++ statements to declare a variable called age, and prompt the user for their age.

What will be an ideal response?


Answers may vary with the prompt for the user; however, the short data type should be used, which is the most efficient integer data type for this type of data.  The variable age should also be initialized.

short age = 0;
cout age;

Computer Science & Information Technology

You might also like to view...

All of the following pose a threat to your computer EXCEPT ________

A) a firewall B) a software update C) a virus D) yourself

Computer Science & Information Technology

Match the following terms to their meanings:

I. query II. report III. form IV. module V. macro A. professional-looking formatted information from tables or queries B. object that allows you to enter data and modify data in a database C. question you ask about data stored in a database D. stored series of commands that carry out an action E. object that adds functionality to a database; written using VBA

Computer Science & Information Technology

The ____ object can be used to save to the database any changes made to the data contained in the DataSet.

A. TableAdapter B. TblEmployBindingSource C. BindingSource D. DataGridView

Computer Science & Information Technology

Case WD 3-1Janice has been assigned to put together the annual report. She has received information from several different people and departments and has put it together into one document. Janice wants to format two pages of the annual report with different margins. What should she do?

A. insert a page break B. insert a quick part C. insert a Cover Page D. insert a section break

Computer Science & Information Technology