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
Bumek [7]
2 years ago
8

Instructions

Computers and Technology
1 answer:
Thepotemich [5.8K]2 years ago
8 0

The output file stream will be coded as such

   ofstream output_file;

   output_file.open("Ch4_Ex15_Output.txt", ios::out);

   output_file << balance;

   input.close();

   output_file.close();

   return 0;

}

<h3>Output file stream</h3>

Generally, Given the instructions we see that the program will "output account balance before and after withdrawal and service charges"

Therefore we must conclude at the output file stream bearing all information required.

double withdraw(double balance) {

   cout << "Current Balance in the account: " << balance << endl;

   if(balance <= 0) {

       cout << "Insufficent balance" << endl;

       return balance;

   }

   double withdraw;

   cout << "Amount of money for withdraw: "; cin >> withdraw;

   if(withdraw > 500) {

       cout << "$500 per day can be withdrawn!";

       return balance;

   }

   double charge = 0;

   if(balance >= withdraw) {

       balance -= withdraw;

       charge = (withdraw <= 300) ? 0 : (withdraw - 300) * 0.04;

   }

   else {

       char option;

       cout << "Insufficient funds! Service charged $25, Want to withdraw money?(Y/N): ";

       cin >> option;

       if(option == 'Y' || option == 'y') {

           balance -= withdraw;

           charge = 25;

       }

   }

   balance -= charge;

   cout << "balance after Withdraw: " << balance << endl;

   cout << "charge for transaction: " << charge << endl;

   return balance;

}

int main() {

   ifstream input;

   input.open("Ch4_Ex15_Data.txt", ios::in);

   double balance;

   input >> balance;

   balance = withdraw(balance);

   ofstream output_file;

\therefore the output stream is

   output_file.open("Ch4_Ex15_Output.txt", ios::out);

   output_file << balance;

   input.close();

   output_file.close();

   return 0;

}

More on Algorithm

brainly.com/question/11623795

You might be interested in
A runner has a speed of 5m/ s and a mass of 130 kg. what is his kinetic energy?
kondaur [170]

Answer:

0.001625

Explanation:

if the velocity of an object is lower than 1% of light speed

8 0
2 years ago
What can help prevent issues related to downloading content from the internet?
vodka [1.7K]

Answer:

D)

Explanation:

3 0
2 years ago
Name of main component of fifth generation of computer​
e-lub [12.9K]

Answer:In the fifth generation, VLSI technology became ULSI (Ultra Large Scale Integration) technology, resulting in the production of microprocessor chips having ten million electronic components. This generation is based on parallel processing hardware and AI (Artificial Intelligence) software.

Explanation: hope this helps ❤️

3 0
3 years ago
The portion of memory that is more or less permanent is called __________ memory.
lisabon 2012 [21]

The portion of memory that is more or less permanent is called <u>long term memory.</u>

<u></u>

<h3>What is Long-term memory?</h3>

Long-term memory guides to the memory process in the brain that takes knowledge from the short-term memory store and creates long-lasting memories. These recollections can be from an hour ago or several decades ago. Long-term memory can hold an unlimited amount of knowledge for an indefinite period of time.

<h3>What is long-term memory in psychology?</h3>

Long-term memory refers to unlimited storage information to be carried for long periods, even for life. There are two types of long-term memory: declarative or direct memory and non-declarative or implicit memory. Direct memory refers to information that can be consciously evoked.

To learn more about Long-term memory, refer

brainly.com/question/25040884

#SPJ4

6 0
1 year ago
What were the goals of the “paperless society” ideal? to more easily access and save information and to reduce waste to create m
sveta [45]

The answer is : to more easily access and save information and to reduce waste. It is more convenient to receive and store our information in a digital format. when we reduce paper waste by using technology more.  

4 0
3 years ago
Read 2 more answers
Other questions:
  • 2.Consider the following algorithm and A is a 2-D array of size ???? × ????: int any_equal(int n, int A[][]) { int i, j, k, m; f
    12·1 answer
  • Minimalism is a major movement in postmodern art. O True O False
    14·1 answer
  • The master system database stores a database template that is used as a blueprint when creating a new user database.
    10·1 answer
  • 1. compression
    11·1 answer
  • PLEASE HELP GIVING 25 POINTS Sophia is leading a project to help clean up a local river in her area. She creates an online forum
    9·2 answers
  • Which of these image sizes takes the most storage space?
    8·2 answers
  • Service that connects on-premises software appliances with cloud based storage is ______
    10·1 answer
  • 3.3 Code Practice: Question 1
    15·1 answer
  • Factors to consider while selecting a software to use​
    14·1 answer
  • If 209g of ethanol are used up in a combustion process, calculator the volume of oxygen used for the combustion at stp​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!