In c++ please
12.5 LAB: Exception handling to detect input string vs. int
The given program r...
![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 30.07.2021 02:40 hinacat87
In c++ please
12.5 LAB: Exception handling to detect input string vs. int
The given program reads a list of single-word first names and ages (ending with -1), and outputs that list with the age incremented. The program fails and throws an exception if the second input on a line is a string rather than an int. At FIXME in the code, add a try/catch statement to catch ios_base::failure, and output 0 for the age.
Ex: If the input is:
Lee 18
Lua 21
Mary Beth 19
Stu 33
-1
then the output is:
Lee 19
Lua 22
Mary 0
Stu 34
![ansver](/tpl/images/cats/User.png)
Answers: 2
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 21:30
Nathan wants to create multiple worksheet containing common formatting styles for his team members. which file extension him to save these worksheets? nathan to create multiple worksheets with common styles. he needs to save them with the extension.
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 00:40
To maintain clarity and focus lighting might be needed
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 08:00
Can someone work out the answer as it comes up in one of my computer science exams and i don't understand the cryptovariables
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 19:00
In python a floating-point number must be written using scientific notation?
Answers: 1
You know the right answer?
Questions
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 09.03.2021 14:00
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 09.03.2021 14:00
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 09.03.2021 14:00
![question](/tpl/images/cats/mat.png)
Mathematics, 09.03.2021 14:00
![question](/tpl/images/cats/mir.png)
World Languages, 09.03.2021 14:00
![question](/tpl/images/cats/himiya.png)
Chemistry, 09.03.2021 14:00
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/himiya.png)
Chemistry, 09.03.2021 14:00
![question](/tpl/images/cats/himiya.png)
Chemistry, 09.03.2021 14:00
![question](/tpl/images/cats/mat.png)
Mathematics, 09.03.2021 14:00
![question](/tpl/images/cats/biologiya.png)
Biology, 09.03.2021 14:00
![question](/tpl/images/cats/mat.png)
Mathematics, 09.03.2021 14:00
![question](/tpl/images/cats/mat.png)