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
leonid [27]
3 years ago
10

Copy the main given below. Write the methods needed to produce the output given. YOU SHOULD NOT CHANGE MAIN

Computers and Technology
1 answer:
Bad White [126]3 years ago
4 0

Answer:

C++ code explained below

Explanation:

CODE

#include <iostream>

using namespace std;

// prototypes go here

void getInput(double *l, double *w) {

cout << "Enter Length: ";

cin >> *l;

if(*l < 0) {

return;

}

cout << "Enter Width: ";

cin >> *w;

while(*w < 0) {

cout << "Width must be positive! Try Again" << endl;

cout << "Enter Width: ";

cin >> *w;

}

}

double calculations(double l, double w, double *perimeter) {

*perimeter = 2 * (l + w);

return l*w;

}

void printResults(double l, double w, double perimeter, double area) {

cout << "Rectangle Dimensions: " << l << " X " << w << endl;

cout << "perimeter: " << perimeter << endl;

cout << "Area: " << area << endl;

return;

}

int main()

{

double t;

// test(&t);

double length;

double width;

double perimeter;

double area;

//below line has to change if you need to work this example

//reason is length and width are local variable to main so other function can only change if address is passed so i have plase & sign before the variables while passing

//same has to be done for perimeter

getInput(&length, &width);

while (length >= 0)

{

area = calculations(length, width, &perimeter);

printResults(length, width, perimeter, area);

getInput(&length, &width);

}

}

You might be interested in
Python Programming
Phoenix [80]

The python program that creates a Bankaccount class for a Bank ATM that is made up of the customers and has a deposit and withdrawal function is given below:

<h3>Python Code</h3>

# Python program to create Bankaccount class

# with both a deposit() and a withdraw() function

class Bank_Account:

def __init__(self):

 self.balance=0

 print("Hello!!! Welcome to the Deposit & Withdrawal Machine")

def deposit(self):

 amount=float(input("Enter amount to be Deposited: "))

 self.balance += amount

 print("\n Amount Deposited:",amount)

def withdraw(self):

 amount = float(input("Enter amount to be Withdrawn: "))

 if self.balance>=amount:

  self.balance-=amount

  print("\n You Withdrew:", amount)

 else:

  print("\n Insufficient balance ")

def display(self):

 print("\n Net Available Balance=",self.balance)

# Driver code

# creating an object of class

s = Bank_Account()

# Calling functions with that class object

deposit()

s.withdraw()

s.display()

Read more about python programming here:

brainly.com/question/26497128

#SPJ1

8 0
2 years ago
The default for automatic replies in outlook is what?
defon

Answer:

The default for automatic replies in outlook is turned off, so the user has to turn it on in order to use it.

Out.look is a program developed by Micro.soft for managing e-mails, being together with G.mail one of the most used worldwide. As in most of these programs, you can configure automatic responses in order to give a quick and generic response to certain types of messages (or even all). Now, this option is disabled by default, so the user must activate it through the configuration of the email box.

6 0
3 years ago
Read 2 more answers
For a project called "The Sheep Market", Aaron Koblin collected drawings of sheep from strangers on the Internet. He posted the
Furkat [3]

Answer:

Aaron could expect a diversity in the style of the sheep drawings.

Explanation:

Crowdsourcing is a simply a sourcing model in which an individual or organizations get goods and services, ideas and finances, from a large, relatively open and often rapidly growing group of internet users.

It makes it easier for participants to achieve a cumulative result through working differently on the same project. That is to say, it provides work between participants to achieve a cumulative result.

Its benefits is that, Crowdsourcing allows businesses to perform tasks more quickly than when a single employee is working alone. Again, Breaking up a project into a collection of smaller pieces and providing these pieces to a larger group of workers hastens the completion of projects. Overall, crowdsourcing presents a more efficient way to do work.

From the Question, Aaron was able to get different pictures of sheep in their numbers also because he used crowsourcing on amazon.

He got a variety of pictures and so many in such a short time for his project "The Sheep Market".

6 0
4 years ago
When you start a new blank document, you begin typing at the
Serhud [2]
C. The insertion poin
6 0
3 years ago
4.8% complete this is a single choice question; skip ahead to question content a b c d confirm difficulty level: moderate an int
PilotLPTM [1.2K]

Answer:

A replay attack

4 0
2 years ago
Other questions:
  • Write a program for playing tic tac toe. Two players take turns marking an available cell in a 3 X 3 grid with their respective
    15·1 answer
  • When is the bond between the actin and myosin head is broken? when an ATP molecule binds to the myosin head when an ATP molecule
    6·1 answer
  • A company has its branches spread over five places in a state. It has become difficult for employees to transfer information and
    7·1 answer
  • Which of the following is no longer necessary when you use HTML5 to develop Webpages? Please Hurry This Is For An Assignment due
    13·1 answer
  • If the variable letter has been defined as a char variable, which of the following are not valid assignment statements to assign
    8·1 answer
  • MS Excel is a powerful spreadsheet program that helps people with complex mathematical calculations. In what ways could you use
    10·1 answer
  • Which of the following actions is an example of "window dressing?" a. Using some of the firm’s cash to reduce long-term debt. b.
    13·1 answer
  • When an item in a menu is black, it means that _____.
    6·2 answers
  • 1. What type of malware is triggered by a specific condition, such as a specific date or a particular user account being disable
    6·1 answer
  • Whats the formatting of a letter to the editor?​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!