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
mixer [17]
2 years ago
10

Why procedures are used and what must be the lastexecutable instruction in a procedure?

Computers and Technology
1 answer:
Art [367]2 years ago
4 0

Answer:

Procedure are used to create and modifying the programs. Basically, it is grouping of instruction that can be used give direction of the flow of program. Control are given to the next term once the execution of the instruction get over. The steps of procedure are:

procedure are first executed the declaration instruction and then coding the procedure, then it will return to the directories and the last executable instruction is the termination of procedure.

You might be interested in
You are training to complete in a local 5K run. You record your time scores in minutes after completing seven practice runs. Wri
trapecia [35]

Answer:

Following are the program to this question:

#include <iostream>//defining header file

using namespace std;

float Avg(float sum, int n)//defining method Avg that accepts float parameter

{

float average=sum/n;//defining float variable average that holds average value  

return average;//return average

}

int main()//defining main method

{

float ar[ ] = {24.1,24.5,24.4,23.8,28.2,29.1,27.4};//defining float array

float sum;//defining float variable sum

int n=7,i;//defining integer variable  

for (i = 0; i <n; i++)//defining loop to count total of array

{

sum=sum+ar[i];//add value in sum variable

}

cout<<"The average is: "<<Avg(sum,n);//use print method to call and print method return value

return 0;

}

Output:

The average is: 25.9286

Explanation:

In the above code, the float method "Avg" is declared, that accepts two parameters, that is "sum and n", inside the method, a float variable average is declared that divides and returns its values.

In the main method a float array "ar" is declared that holds values, in the next line, float variable "sum" and integer variable "n, j" is used.

In for loop, the "i" variable is used to add array values in the sum variable and pass into cout to call the "Avg" method and print its return value.

3 0
2 years ago
HELP ME PLZ QUICK Adam is writing a program that: 1) has the user guess a number, and 2) tells the user how many guesses it took
topjm [15]

Adam might have forgotten to loop the guessing code, meaning that instead of letting him guess multiple times, it simply does it once and ends the program. This could be fixed by adding a while loop, or something of the sort, that doesn't let the user finish the program until they guess the number correctly, while adding to the variable that stores the number of guesses each loop.

8 0
3 years ago
How is the Internet Simulator similar to the Actual Internet? How is it different?
masya89 [10]
The Internet Simulator is a tool developed by Code.org for our new high school Computer Science Principles class. ... The Internet Simulator was designed to be used in a classroom with students working collaboratively in-person to solve problems.
4 0
3 years ago
Give state diagrams of DFAs that recognize the following languages.
k0ka [10]

Answer:

Following is attached the solution of each part step-by-step. I hope it will help you!

Explanation:

6 0
3 years ago
What ideas should I write about for information writing
Lady bird [3.3K]
Well first of all who is your favorite celebrity?
Then find some research and look up interesting facts you did not know about.
5 0
3 years ago
Read 2 more answers
Other questions:
  • ORANGE COLORED SIGNS AND FLAGS MEAN THAT YOU MUST BE ALERT FOR:
    8·2 answers
  • Networks that are designed to connect similar computers that share data and software with each other are called:
    10·1 answer
  • 1. The global economy involves trading between people from different _____
    8·1 answer
  • The largest type of computer system with the most extensive storage capacity and the fastest processing speeds is a ________.
    7·1 answer
  • Air circulation is caused by ... A Earth's rotation around the sun B winds that move vertically C moving air between hot and col
    11·1 answer
  • Two types of formulas in Excel, what are they? A. Complex and simple, B. General and currency, C. Logical and Boolean, D. Trig a
    15·1 answer
  • Which is a benefit of using the paste link option?
    15·2 answers
  • What is adobe photoshop?
    10·2 answers
  • What part of the meat help you identify the less tender cuts​
    13·1 answer
  • H e l p ASAP plz <br> and thanks
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!