1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
bogdanovich [222]
2 years ago
6

What is the output of this program? Assume the user enters 2, 5, and 10.

Computers and Technology
1 answer:
Degger [83]2 years ago
4 0

Answer: 17.0

Explanation: I did ran it on PyCharm and that was the outcome.

PLEASE MARK BRAINLIEST AND RATE MY ANSWER :)

You might be interested in
What type of software repairs or improves a larger application that is already installed on a system?
earnstyle [38]

Answer:

<h2>Mapping</h2>

Explanation:

<h2>Hope it helps you</h2>
7 0
2 years ago
Read 2 more answers
There Are Two Programs in this Question who will attempt first i will give brainliest ans reward and big points:-
Korolek [52]

Answer:

here you go ,could only do Question 2.try posting question 1 seperately maybe someone else can also try to help

Explanation:

Question 2.

#include <iostream>

using namespace std;

// class BankAccount

class BankAccount{

  

    // instance variables

    private:

        int accountID;

        int balance;

  

    public:

      

        // constructor

        BankAccount(int accountID, int balance){

            this->accountID = accountID;

            this->balance = balance;

        }

      

        // getters and setters

        void setAccoutnId(int accountID){

            this->accountID = accountID;

        }

      

        int getAccountId(){

            return accountID;

        }

      

        void setBalance(int balance){

            this->balance = balance;

        }

      

        int balanceInquiry(){

            return balance;

        }

};

class CurrentAccount : public BankAccount{

  

    public:

  

        // constructor

        CurrentAccount(int accountID, int balance):BankAccount(accountID,balance){

          

        }

      

        // function amount to withdraw

        void amountWithdrawn(int amount){

            setBalance(balanceInquiry()-amount);

        }

      

        // function to deposit amount

        void amountDeposit(int amount){

            setBalance(balanceInquiry()+amount);

        }

};

class SavingsAccount : public BankAccount{

  

    public:

      

        // constructor

        SavingsAccount(int accountID, int balance):BankAccount(accountID,balance){

          

        }

  

        // function amount to withdraw

        void amountWithdrawn(int amount){

            setBalance(balanceInquiry()-amount);

        }

      

         // function to deposit amount

        void amountDeposit(int amount){

            setBalance(balanceInquiry()+amount);

        }

      

      

};

int main()

{

    // calling function of Current Account

    cout<<"Current Account : "<<endl;

    CurrentAccount current(122,100000);

    current.amountWithdrawn(10000);

    cout<<"Your balance after withdraw : ";

    cout<<current.balanceInquiry()<<endl;

    current.amountDeposit(30000);

    cout<<"Your balance after deposit : ";

    cout<<current.balanceInquiry()<<endl;

    cout<<endl<<endl;

  

    // calling function of Savings Account

    cout<<"Savings Account : "<<endl;

    SavingsAccount saving(125,80000);

    saving.amountWithdrawn(5000);

    cout<<"Your balance after withdraw : ";

    cout<<saving.balanceInquiry()<<endl;

    saving.amountDeposit(20000);

    cout<<"Your balance after deposit : ";

    cout<<saving.balanceInquiry();

    return 0;

}

4 0
2 years ago
How do I use this site?brainly.com
Zarrin [17]
You just answer other people’s questions you can also use this app to help you with your questions as well
5 0
2 years ago
Internet Explorer, Apple Safari, Google Chrome, and Mozilla Firefox are examples of web browsers.
Brrunno [24]
True, and there are many other web browsers
5 0
3 years ago
Read 2 more answers
How do you put and play a video at a certain time in google slides?
yKpoI14uk [10]
I think you can copy and paste
6 0
3 years ago
Other questions:
  • A media file refers to what kind of file? A. Clip art
    8·2 answers
  • Which term describes a protocol to manage a network, able to configure a network, monitor activity, and control devices?
    10·2 answers
  • Which one of the following rules for selecting a password is the best?
    5·2 answers
  • How to search for the largest files on my computer vista?
    5·1 answer
  • Function Name: d2x Parameters: int, int Returns: string Description: Write function, d2x, that takes as input a nonnegative inte
    10·1 answer
  • How would you justify using cloud computing?
    12·1 answer
  • Write a Java class with the following methods: getArray(int numStrings) is an instance method that takes command line input (use
    11·1 answer
  • Whats the best way to get into a computers programming to get past firewalls
    15·2 answers
  • . Which of the following is NOT a valid declaration for a character string?
    6·1 answer
  • Select the correct answer.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!