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
The application window controls include: minimize, maximize, and close<br><br> A) true <br> B) false
Arlecino [84]

Answer:

True

Explanation:

Look at the top right of your computer while having a chrome tab open. You will see a line, a box, and a x. Hover over each and you can see the names.

6 0
3 years ago
Assignment 10: Create a Song of the Summer edhesive
Marrrta [24]

To create a song of the Summer edhesive you can use the Python Code,

which will help you create sections based on the music genre.

<h3 /><h3>What is Python code?</h3>

It corresponds to a programming language that enables the development of various media platforms, such as games, social networks and artificial intelligence applications.

Therefore, the Python code helps to automate tasks as it is an open-source language, allowing communication and adaptation of different objectives.

Find out more about Phython code here:

brainly.com/question/16397886

#SPJ1

3 0
2 years ago
Read 2 more answers
Some technologies like vertical farming have a number of negative effects. Which is a negative outcome of this technology? A. In
Tanya [424]
<span>Vertical farming is the exercise of creating foodstuff and medication in sheer laden layers, vertically inclined exteriors and/or combined in other structures. The modern thoughts of vertical farming use indoor farming methods and controlled-environment agriculture (CEA) technology, where all environmental issues can be well-ordered. So knowing all of this, the negative outcome would be D.</span>
4 0
4 years ago
How do you close a document but keep the word processing program open?
Zielflug [23.3K]

You open a new tab for word then close a other document

7 0
3 years ago
Read 2 more answers
wants to redesign the user interface. The customer service agents use ________ to enter explicit statement to invoke operations
andrezito [222]

Answer:

The correct answer to use in filling in the gap is "Command languages interaction".

Explanation:

Command languages interaction occurs when the user enters command which are not always remembered, the computer executes it (with feedback if necessary), then requests next command.

This implies that under command languages interaction, "Command prompts" are employed by users who enter in commands and maybe certain parameters that impact how the command is executed.

Therefore, the correct answer to use in filling in the gap is "Command languages interaction".

6 0
3 years ago
Other questions:
  • Conventional prescription eyeglasses are considered sufficient PPE for eye protection. A) True B) False
    11·1 answer
  • ZigBee is an 802.15.4 specification intended to be simpler to implement, and to operate at lower data rates over unlicensed freq
    7·1 answer
  • Write a python program that asks the user to enter a student's name and 8 numeric tests scores (out of 100 for each test). The n
    5·1 answer
  • Consider the following process for generating binaries. A compiler is used to generate the object code for individual modules, a
    8·1 answer
  • You are a network engineer tasked with performing a site survey for a multiple-channel architecture (MCA) system in a three-stor
    11·1 answer
  • When you evaluate the use of digital media, how has it affected the newspaper business? The rise of digital media has caused new
    8·1 answer
  • Why does this happen to me?
    14·1 answer
  • True or false, USBs are slower than RAM.
    15·1 answer
  • If you play video games, please answer these questions it’s for a survey for my game development class!!
    5·1 answer
  • Which of the following are benefits of designing a scalable system? Choose 3 options.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!