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
White raven [17]
2 years ago
5

Complete function PrintPopcornTime(), with int parameter bagOunces, and void return type. If bagOunces is less than 2, print "To

o small". If greater than 10, print "Too large". Otherwise, compute and print 6 * bagOunces followed by " seconds". End with a newline. Example output for ounces.1 #include 2 using namespace std; 34 void PrintPopcornTime (int bagOunces)5 6 Your solution goes here 10 int main) 7891011 PrintPopcornTime(7) 12 13 return 0 14
Computers and Technology
1 answer:
Ludmilka [50]2 years ago
4 0

Answer:

#include <iostream>

using namespace std;

void PrintPopcornTime (int bagOunces){

   if (bagOunces < 2){

       cout << "Too small"<<endl;

   }

   else if (bagOunces > 10){

       cout << "Too large"<<endl;

   }

   else{

       cout << bagOunces*6 <<" seconds"<<endl;

   }

}

int main(){

   PrintPopcornTime(7);

   

   return 0;

}

Explanation:

Create a function called PrintPopcornTime that takes one parameter, bagOunces

Check the bagOunces using if-else structure. If it is smaller than 2, print "Too small". If it is greater than 10, print "Too large". Otherwise, calculate and print 6*bagOunces followed by " seconds".

Call the function in the main function with parameter 7. Since 7 is not smaller than 2 or not greater than 10, "42 seconds" will be printed.

You might be interested in
A program written in a(n) procedural language consists of sequences of statements that manipulate data items. __________________
Alenkasestr [34]

Answer:

true.

Explanation:

According to my research on information technology, I can say that based on the information provided within the question the statement is completely true. Procedural programming is a widely used paradigm that basically gives the program a set of routines or specifications, and the program mixes and matches them as they continuously repeat the process. It is used in many areas, including video game development.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

7 0
3 years ago
What color is excel?​
Eduardwww [97]

Answer:

green

Explanation:

5 0
2 years ago
Read 2 more answers
Compare the elements of the basic Software Development Life Cycle with 2 other models. How are they similar? How are they differ
Artemon [7]

Answer:

Explanation:

One of the basic notions of the software development process is SDLC models which stands for Software Development Life Cycle models. SDLC – is a continuous process, which starts from the moment, when it’s made a decision to launch the project, and it ends at the moment of its full remove from the exploitation. There is no one single SDLC model. They are divided into main groups, each with its features and weaknesses. The most used, popular and important SDLC models are given below:

1. Waterfall model

2. Iterative model

3. Spiral model

4. V-shaped model

5. Agile model

Stage 1. Planning and requirement analysis

Each software development life cycle model starts with the analysis, in which the stakeholders of the process discuss the requirements for the final product.

Stage 2. Designing project architecture

At the second phase of the software development life cycle, the developers are actually designing the architecture. All the different technical questions that may appear on this stage are discussed by all the stakeholders, including the customer.  

Stage 3. Development and programming

After the requirements approved, the process goes to the next stage – actual development. Programmers start here with the source code writing while keeping in mind previously defined requirements. The programming by itself assumes four stages

• Algorithm development

• Source code writing

• Compilation

• Testing and debugging

Stage 4. Testing

The testing phase includes the debugging process. All the code flaws missed during the development are detected here, documented, and passed back to the developers to fix.  

Stage 5. Deployment

When the program is finalized and has no critical issues – it is time to launch it for the end users.  

SDLC MODELS

Waterfall – is a cascade SDLC model, in which development process looks like the flow, moving step by step through the phases of analysis, projecting, realization, testing, implementation, and support. This SDLC model includes gradual execution of every stage completely. This process is strictly documented and predefined with features expected to every phase of this software development life cycle model.

ADVANTAGES  

Simple to use and understand

DISADVANTAGES

The software is ready only after the last stage is over

ADVANTAGES

Management simplicity thanks to its rigidity: every phase has a defined result and process review

DISADVANTAGES

High risks and uncertainty

Iterative SDLC Model

The Iterative SDLC model does not need the full list of requirements before the project starts. The development process may start with the requirements to the functional part, which can be expanded later.  

ADVANTAGES                                        

Some functions can be quickly be developed at the beginning of the development lifecycle

DISADVANTAGES

Iterative model requires more resources than the waterfall model

The paralleled development can be applied Constant management is required

Spiral SDLC Model

Spiral model – is SDLC model, which combines architecture and prototyping by stages. It is a combination of the Iterative and Waterfall SDLC models with the significant accent on the risk analysis.

4 0
2 years ago
The Twitter website has become a de facto first source for many important events in the last decade. Twitter's hashtag feature l
timurjin [86]

Answer:

..........................................?

7 0
2 years ago
Read 2 more answers
How do you draw first angle of orthographic projection ​
attashe74 [19]
Https://technologystudent.com/designpro/ortho1.htm
5 0
2 years ago
Other questions:
  • About ___% of children score within one standard deviation above or below the national average in intelligence.
    5·1 answer
  • Write a Python function merge_dict that takes two dictionaries(d1, d2) as parameters, and returns a modified dictionary(d1) cons
    5·1 answer
  • Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both doubles) as input, and output the g
    7·2 answers
  • If a menu item requires additional information from the user, the Windows standard is to place a(n) ____ at the end of the capti
    12·1 answer
  • Determine the number of cache sets (S), tag bits (t), set index bits (s), and block offset bits (b) for a 40964096-byte cache us
    15·1 answer
  • Por que se dice que la tecnología ha tenido muchos aportes positivos para la sociedad pero también nos ha hecho dependientes de
    9·1 answer
  • I really need this done Thank you!!
    6·1 answer
  • Write a description of the photograph to someone who cannot see the photograph. Be sure to include the title of the photograph a
    5·1 answer
  • 1. Write the full forms of the following.
    8·2 answers
  • Non related to school but im interested,<br><br> Who here actually watches dream smp be honest
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!