Skip to content

  • Home
  • Mathematics
  • English
  • History
  • Chemistry
  • Biology
  • Law
  • Medicine
  • Business
  • Toggle search form

Double balance; try { cout < < ‘enter the balance: ‘; cin > > balance; cout

Posted on October 23, 2021 By Dbzrules02 3 Comments on Double balance; try { cout < < ‘enter the balance: ‘; cin > > balance; cout

Double balance; try { cout < < "enter the balance: "; cin > > balance; cout < < endl; if (balance < 1000.00) throw balance; cout < < "leaving the try block." < < endl; } catch (double x) { cout < < "current balance: " < < x < < endl < < "balance must be greater than 1000.00" < < endl; } a. in this code, identify the try block.

Computers and Technology

Post navigation

Previous Post: Communities converted to Christianity because they
Next Post: “Love your neighbor as yourself” means we should treat others the same way we want others to treat us: with respect, kindness, and even love.TrueorFalse

Comments (3) on “Double balance; try { cout < < ‘enter the balance: ‘; cin > > balance; cout”

  1. Expert says:
    October 23, 2021 at 4:39 pm

    answer; monitor is the correct answer. good luck

    Reply
  2. Crxymia says:
    October 24, 2021 at 1:58 am

    Answer given below

    Explanation:

    Program:

    1. double balance;

    2. try{

    3. cout<<"Enter the balance :";

    4. cin >> balance;

    5. cout<<endl;

    6. if(balance < 1000.00)

    7. throw balance;

    8. cout<<"Leaving the try block."<<endl;

    9. }

    10. catch(double x){

    11. cout<<" Current balance : "<<x<<endl<<"Balance must be greater than 1000.00"<<endl;;

    12. }

    Answer A:

    If we consider the above program lines, try block represents from 2 to 9 lines.

    Answer B:

    If we consider the above program lines, catch block represents from 10 to 12 lines.

    Answer C:

    catch block parameter is x and its type is double.

    Answer D:

    If we consider the above program lines, line number 7 indicates throw statement.

    Reply
  3. Expert says:
    October 24, 2021 at 5:33 am

    Huhuhubuhuhuhuhuhuh ya um

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Advanced Placement (AP)
  • Arts
  • Biology
  • Business
  • Chemistry
  • Computers and Technology
  • Engineering
  • English
  • French
  • Geography
  • German
  • Health
  • History
  • Law
  • Mathematics
  • Medicine
  • Physics
  • SAT
  • Social Studies
  • Spanish
  • World Languages

© 2021 studyqas

Powered by PressBook WordPress theme