Starting Out with C++: Early Objects
Starting Out with C++: Early Objects
8th Edition
ISBN: 9780133360929
Author: Tony Gaddis, Judy Walters, Godfrey Muganda
Publisher: Addison-Wesley
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 2, Problem 1RQE

Every complete statement ends with a _____.

Expert Solution & Answer
Check Mark
Program Description Answer

C++ statement ends with “semicolon (“;”)”.

Explanation of Solution

Semicolon (;):

Semicolon is a type of command in C++.

  • The semicolon is used to indicate to the compiler that the command ends here.
  • Semicolon is used as delimiter in C++ to intentionally separate a command from the following C++ command.
  • If a semicolon is missed in any of the statements, then the program produces an error.

Example for the purpose of Semicolon (;):

//Declare and initialize the variables

double value1 = 28;

double value2 = 32;

double value3 = 37;

The above three variable declaration statements are all individual commands separated by the semicolon.

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
03:45
Students have asked these similar questions
Create a change-counting game that gets the user to enter the number of coins required to make exactly one dollar. The program should let the user enter the num- ber of pennies, nickels, dimes, and quarters. If the total value of the coins entered is equal to one dollar, the program should congratulate the user for winning the game. Otherwise, the program should display a message indicating whether the amount entered was more than or less than one dollar.
A retail store grants its customers a maximum amount of credit. Each customer’s available credit is his or her maximum amount of credit minus the amount of credit used. Write a program that asks for a customer’s maximum amount of credit and then asks for the amount of credit used. The program should then properly display the customer’s available credit.  Be sure that you check that the user is entering positive values and that the display is formatted correctly.
The following code intends to input a user’s first name, last name, and age.However, it has an error. Fix the code.string fullName;int age;cout << "Enter your first and last name." << endl;cin >> fullName;cout << "Enter your age." << endl;cin >> age;cout << "You are " << age << " years old, " << fullName << endl;

Chapter 2 Solutions

Starting Out with C++: Early Objects

Ch. 2.7 - Prob. 2.11CPCh. 2.7 - Prob. 2.12CPCh. 2.7 - Prob. 2.13CPCh. 2.7 - How would you combine the following variable...Ch. 2.7 - How would you combine the following variable...Ch. 2.8 - Prob. 2.16CPCh. 2.8 - What will the following code display? int number;...Ch. 2.8 - Prob. 2.18CPCh. 2.10 - Prob. 2.19CPCh. 2.10 - Which of the following is a character literal? 'B'...Ch. 2.10 - Prob. 2.21CPCh. 2.10 - What is wrong with the following program...Ch. 2.10 - Prob. 2.23CPCh. 2.10 - Write a program that stores your name, address,...Ch. 2.15 - Is the following assignment statement valid or...Ch. 2.15 - What is wrong with the following program? How...Ch. 2.15 - What will be assigned to x in each of the...Ch. 2.15 - Prob. 2.28CPCh. 2 - Every complete statement ends with a _____.Ch. 2 - To use cout statements you must include the _____...Ch. 2 - Every C++ program must have a function named...Ch. 2 - Prob. 4RQECh. 2 - A group of statements, such as the body of a...Ch. 2 - 'A', and "Hello World" are all examples of _____.Ch. 2 - 978.65 1012 would be written in E notation as...Ch. 2 - Prob. 8RQECh. 2 - Indicate if each of the following assignment...Ch. 2 - If the variables letter and w have been defined as...Ch. 2 - Indicate if each of the following cout statements...Ch. 2 - Indicate if each of the following cout statements...Ch. 2 - Assume integers x = 4, y = 7, and z = 2. What...Ch. 2 - Assume double variables x = 2.5, y = 7.0, and z =...Ch. 2 - Write a C++ statement that defines the double...Ch. 2 - Write a C++ statement that defines the int...Ch. 2 - Write assignment statements that perform the...Ch. 2 - Write assignment statements that perform the...Ch. 2 - Modify the following program segment so it prints...Ch. 2 - Rewrite the follow statement to use the newline...Ch. 2 - Create detailed pseudocode for a program that...Ch. 2 - Prob. 22RQECh. 2 - Prob. 23RQECh. 2 - Create detailed pseudocode for a program that...Ch. 2 - What will the following programs print on the...Ch. 2 - A) #include iostream using namespace std; int main...Ch. 2 - The following program contains many syntax errors....Ch. 2 - Soft Skills Programmers need good communication...Ch. 2 - Sum of Two Numbers Write a program that stores the...Ch. 2 - Prob. 2PCCh. 2 - Prob. 3PCCh. 2 - Restaurant Bill Write a program that computes the...Ch. 2 - Prob. 5PCCh. 2 - Prob. 6PCCh. 2 - Prob. 7PCCh. 2 - Prob. 8PCCh. 2 - Prob. 9PCCh. 2 - Prob. 10PCCh. 2 - Prob. 11PCCh. 2 - Prob. 12PCCh. 2 - Prob. 13PCCh. 2 - Prob. 14PCCh. 2 - Prob. 15PCCh. 2 - Prob. 16PCCh. 2 - Prob. 17PCCh. 2 - Prob. 18PC

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Python Tutorial #10; Math Functions in Python; Author: Art of Engineer;https://www.youtube.com/watch?v=OviXsGf4qmY;License: Standard YouTube License, CC-BY