This assignment asks you to list out the Parts and Chapters of a book. The user enters the number of Parts, and then the number of Chapters per Part. The program prints out start and end messages for each Part of the book. Within each Part, a message is printed for each Chapter. It is assumed that every Part has the same number of Chapters. Use "while" loops to do this assignment. A sample: Another sample: Enter number of Parts: 3 Enter number of Chapters: 4 Enter number of Parts: 4 Enter number of Chapters: 2 Begin Part 1 Chapter 1 Chapter 2 Chapter 3 Chapter 4 Begin Part 1 Chapter 1 Chapter 2 End Part 1 End Part 1 Begin Part 2 Chapter 1 Chapter 2 Begin Part 2 Chapter 1 Chapter 2 Chapter 3 Chapter 4 End Part 2 End Part 2 Begin Part 3 Chapter 1 Chapter 2 Begin Part 3 Chapter 1 Chapter 2 Chapter 3 Chapter 4 End Part 3 Begin Part 4 Chapter 1 Chapter 2 End Part 4 End Part 3
This assignment asks you to list out the Parts and Chapters of a book. The user enters the number of Parts, and then the number of Chapters per Part. The program prints out start and end messages for each Part of the book. Within each Part, a message is printed for each Chapter. It is assumed that every Part has the same number of Chapters. Use "while" loops to do this assignment. A sample: Another sample: Enter number of Parts: 3 Enter number of Chapters: 4 Enter number of Parts: 4 Enter number of Chapters: 2 Begin Part 1 Chapter 1 Chapter 2 Chapter 3 Chapter 4 Begin Part 1 Chapter 1 Chapter 2 End Part 1 End Part 1 Begin Part 2 Chapter 1 Chapter 2 Begin Part 2 Chapter 1 Chapter 2 Chapter 3 Chapter 4 End Part 2 End Part 2 Begin Part 3 Chapter 1 Chapter 2 Begin Part 3 Chapter 1 Chapter 2 Chapter 3 Chapter 4 End Part 3 Begin Part 4 Chapter 1 Chapter 2 End Part 4 End Part 3
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 20PE
Related questions
Question
Java
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
Knowledge Booster
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.Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning