Identify all the errors of the following C++ program, write down the line number and the error you find. 1. winclude using name-space std; 2 Bint main() { int i, nbr nbr; 1/mbrnbr is for testing numbers double nbri =- e, nbrmax; 4 do { cout « "Enter the number of values to be tested : - cin » nbrnbr; 9 10 11 12 for(i==1; ic==nbrnbr; i+) 13 14 cout « "Enter the value number " «i « : cin >» nbrl; if (nbrmax < nbr1) nbrmax <= nbr1; 15 16 17 18 cout « "The greatest value" of those entered humbers is : " « nbrmax « endl; ) while(nbrnbr != 0); system("pause"); 19 20 21 22 Write and test the corrected C++ program and write down what is the output.
Identify all the errors of the following C++ program, write down the line number and the error you find. 1. winclude using name-space std; 2 Bint main() { int i, nbr nbr; 1/mbrnbr is for testing numbers double nbri =- e, nbrmax; 4 do { cout « "Enter the number of values to be tested : - cin » nbrnbr; 9 10 11 12 for(i==1; ic==nbrnbr; i+) 13 14 cout « "Enter the value number " «i « : cin >» nbrl; if (nbrmax < nbr1) nbrmax <= nbr1; 15 16 17 18 cout « "The greatest value" of those entered humbers is : " « nbrmax « endl; ) while(nbrnbr != 0); system("pause"); 19 20 21 22 Write and test the corrected C++ program and write down what is the output.
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter7: User-defined Simple Data Types, Namespaces, And The String Type
Section: Chapter Questions
Problem 1TF
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 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++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr