Lab 10-1: Write a test program to accept two numbers from consol.  Then check to see if first number is larger than second number .  If it is throwing an exception and handle the error properly.   Lab 10-2: Write a test program to accept a number from consol.  then check to see if the number is positive or negative.  If it is negative throw an exception and indicate the number is negative otherwise take the squire root of the number.  Use exception handling to control the flow of the code.     Lab 10-3: Write a test program to accept a number from consol.  This number is radius of circle if the number is positive find area and circumference.  Otherwise, throw an exception with proper message.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter14: Exception Handling
Section: Chapter Questions
Problem 4PE
icon
Related questions
Question

c++ programming

Lab 10-1:

Write a test program to accept two numbers from consol.  Then check to see if first number is larger than second number .  If it is throwing an exception and handle the error properly.

 

Lab 10-2:

Write a test program to accept a number from consol.  then check to see if the number is positive or negative.  If it is negative throw an exception and indicate the number is negative otherwise take the squire root of the number.  Use exception handling to control the flow of the code.  

 

Lab 10-3:

Write a test program to accept a number from consol.  This number is radius of circle if the number is positive find area and circumference.  Otherwise, throw an exception with proper message. 

 

Lab 10-4:

Show the output of the following code with input 10, 60, and 120, respectively.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 7 images

Blurred answer
Knowledge Booster
Exception Handling Keywords
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
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT