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
olya-2409 [2.1K]
2 years ago
6

Using functions,

Computers and Technology
1 answer:
ZanzabumX [31]2 years ago
8 0

Answer:

See explaination

Explanation:

#include <iostream>

using namespace std;

int main()

{

double h, w;

int s, a, b;

cout<<"height in feet: ";

cin>>h;

cout<<"width in feet: " ;

cin>>w;

cout<<"tile size in inches:";

cin>>s;

int height = h*12;

if(height%s==0)

a = height/s;

else

a = height/s + 1;

int width = w*12;

if(width%s==0)

b = width/s;

else

b = width/s + 1;

cout<<"Number of tiles: "<<a*b;

}

You might be interested in
Instructions
Thepotemich [5.8K]

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

8 0
1 year ago
The most serious security threat to Bluetooth-enabled devices is ____, which occurs when a hacker gains access to the device and
Semmy [17]

The most serious security threat to Bluetooth-enabled devices is \sf\purple{bluebugging}, which occurs when a hacker gains access to the device and its functions without the owner's consent.

\large\mathfrak{{\pmb{\underline{\orange{Happy\:learning }}{\orange{.}}}}}

6 0
3 years ago
The chain of _____ documents that the evidence was under strict control at all times and no unauthorized person was given the op
Arturiano [62]

Answer:

custody.

I hope I could help

4 0
1 year ago
What is true about super computers?
lorasvet [3.4K]

Explanation:

Super Computer are expensive computer that are used to provide very quick results. Super computer are used in calculating complex mathematical calculations. Calculations such as weather forecast and Atomic energy research. Therefore Super Computer perform complex calculations rapidly.

5 0
3 years ago
If you've finished working with a data file but intend to work on it again during your work session, which button would you use
mariarad [96]
Hey there! Hello!

So, not sure if there's actually a button to "close out" a window to where you're able to reopen it again without having to go to where the file is located or go to recents in your application. Keep in mind that I'm on a MacBook, but I have worked on a Windows computer before. 

One thing you can do is minimize the window. Your program will remain open, but your window will remain out of your way until you decide to expand it again. This seems to be the closest thing possible to your description, but if you had something else in mind, I'd love to hear more details.

This won't be a good solution if you're looking to cut down on the energy that certain programs may be taking up while open, even if you're not using them. But in terms of getting the windows off your desktop, minimizing is the way to go. It also allows you to have documents/windows out of the way while still being able to work on other documents/windows in the program (i.e. Microsoft Word, Google Chrome, Pages, etc.)

Hope this helped you out! Feel free to ask me any additional questions you may have. :-)
5 0
2 years ago
Read 2 more answers
Other questions:
  • A disk rotates at a rate of 7200 revolutions per minute. Seek operations (i.e., moving the access head to a desired track) take
    6·1 answer
  • Using Python
    14·1 answer
  • Which of the following is the rarest and most valuable mineral ore among the native elements?
    13·1 answer
  • To begin importing data from an excel spreadsheet, click on the ____ tab on the ribbon.
    11·1 answer
  • What are the uses of plotters​
    7·2 answers
  • How many total cells can a worksheet window contain? If columns are labelled alphabetically, what will be the label for the cell
    15·1 answer
  • I have a top-secret recipe for the greatest cookie dough I have made and I want to keep the recipe a secret so I apply for a? *
    15·1 answer
  • How to use emojis on chromebook without on-screen keyboard
    14·1 answer
  • Which language should you use to add functionality to web pages.
    10·1 answer
  • Look at the code in the example below, and then answer the question.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!