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
Valentin [98]
3 years ago
6

What kinds of circumstances would lead you to writing a function versus using a loop? please explain in simple terms

Computers and Technology
1 answer:
GREYUIT [131]3 years ago
5 0

Answer:

1. You want to use parameters

2. You don't want your program to run multiple times

3. You want to call that snippet of code throughout your program

hope this helped :D

You might be interested in
Why is it important to create a web maintenance schedule? Check all of the boxes that apply.
Andreas93 [3]
Attach a picture so we can see the question
3 0
3 years ago
TRUE OR FALSE !!!!
NeX [460]

Answer:

True

Explanation:

4 0
4 years ago
Read 2 more answers
Higher Order Functions used for simulations of dice rolls. Definition: An n-sided dice function takes no arguments and always re
tiny-mole [99]

Answer:

#include <iostream>

#include <time.h>

#include <string>

using namespace std;

int main(){

srand(time(NULL));

cout<<"Throw dice"<<endl;

int b =0;

int a=0;

a=rand()%6;

b=rand()%6;

for (int i =0;i<1;i++)

{cout<<"dice one: "<<a<<endl;}

for (int i =0;i<1;i++)

{cout<<"dice two: "<<b<<endl;}

if(a>b)

{cout<<"first dice won"<<endl;}

if(b>a)

{cout<<"second dice won"<<endl;}

else{cout<<"they are same"<<endl;

return main();

}

return 0;

}

Explanation:

/*best dice roll game just for you change it as you want but all necessary things are there/*

5 0
3 years ago
2. It is the art of creating computer graphics or images in art, print media, video games.
vfiekz [6]
The answer is CGI :)
4 0
3 years ago
How can you use the cash envelop system and the 50-30-20 rule at the same time
Amanda [17]

Answer:

hi

Explanation:

6 0
3 years ago
Other questions:
  • What is the only true way to wipe out every possibility of the virus?
    11·1 answer
  • Under normal operations, cisco recommends that you configure switch ports on which vlan
    5·1 answer
  • What kind of fragment is near the computer?
    14·1 answer
  • Addition and subtraction are considered to be ____ operations performed by a computer.
    7·1 answer
  • Which of the following sentences uses correct punctuation? A. I am a good communicator, and I am a strong team member. B. I comm
    12·2 answers
  • IoT is the interconnection of what?<br> Hardware<br> Networks<br> Everyday devices<br> Cables
    10·1 answer
  • What will be the value of x after the following code is executed? int x = 10; do { x *= 20; } while (x &lt; 5); A. 10 B. 200 C.
    14·2 answers
  • In Java. Write a program that creates an integer array with 50 random values, prompts the user to enter the index of an element
    5·1 answer
  • 3. Maria is in charge of consolidating the names of the participants of the two-day virtual
    13·1 answer
  • Nadia has inserted an image into a Word document and now would like to resize the image to fit the document befter. What is the
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!