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

You are training to complete in a local 5K run. You record your time scores in minutes after completing seven practice runs. Wri

te a method to calculate and return the average score based on the data.
Computers and Technology
1 answer:
trapecia [35]2 years ago
3 0

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.

You might be interested in
A block signature indicating that a text message was typed on a mobile device is an example of ____________.
Katarina [22]

A block signature indicating that a text message was typed on a mobile device is an example of  <u>impression management</u>.

The correct option is A.

<h3>What is  impression management?</h3>

Impression management is a conscious or unconscious process whereby individuals strive to regulate and control information in social interactions in order to affect how others perceive a person, an item, or an event.

<h3>What is the main goal of impression management?</h3>

The actions people take to influence others' perceptions of a notion are referred to as impression management. Depending on their objectives, people can work to reinforce existing beliefs or make an effort to change them.

<h3>What is block signature?</h3>

A signature block is the text that surrounds a signature and offers context for the signature as well as additional details. An email message, Usenet article, or forum post's signature block is a customized block of text that is automatically attached at the bottom of these types of documents.

To know more about  block signature visit:

brainly.com/question/2123747

#SPJ4

I understand that the question you are looking for is :

A block signature indicating that a text message was typed on a mobile device is an example of ____________.

A. impression management

B. convergence

C. evaluative language

D .pragmatic rules

6 0
2 years ago
Hello pls answer<br><br><br>what is the use of loop in java​
xxMikexx [17]
The use of loop in java is to run a block of code for a certain number of times.
7 0
2 years ago
Which type of network allows backups and network security to be centrally located?
BlackZzzverrR [31]

Answer:

B

Explanation:

B is the answer.

3 0
1 year ago
Define a function compute_gas_volume that returns the volume of a gas given parameters pressure, temperature, and moles. Use
jeyben [28]

Question:

Define a function compute_gas_volume that returns the volume of a gas given parameters pressure, temperature, and moles. Use the gas equation PV = nRT, where P is pressure in Pascals, V is volume in cubic meters, n is number of moles, R is the gas constant 8.3144621 ( J / (mol*K)), and T is temperature in Kelvin.

Answer:

This solution is implemented in C++

double compute_gas_volume(double P, double T, double n){

   double V = 8.3144621 * n * T/P;

   return V;

}

Explanation:

This line defines the function, along with three parameters

double compute_gas_volume(double P, double T, double n){

This calculates the volume

   double V = 8.3144621 * n * T/P;

This returns the calculated volume

   return V;

}

To call the function  from the main, use:

<em>cout<<compute_gas_volume(P,T,n);</em>

<em />

<em>Where P, T and n are double variables and they must have been initialized</em>

5 0
3 years ago
Unit testing:_________. A. provides the final certification that the system is ready to be used in a production setting. B. incl
NARA [144]

Answer:

Option (C) is the correct option to the following question.

Explanation:

The following option is correct because the unit testing is the process of testing a single unit of software at a time, which means the testing of each and every program separately.

In simple words, Unit testing a process of testing in which the developer executes the single method or a function, statements or loop in the program of the software to checking is it working fine or not.

7 0
2 years ago
Other questions:
  • Suppose that cells B1 through B100 of an Excel spreadsheet contain the quantity of units ordered on each of 100 different days.
    13·1 answer
  • Your Economics teacher has asked you to create a chart showing how supply and demand affects the price of gasoline. Which applic
    13·2 answers
  • Why is it important to ensure that dns servers have been secured before implementing an e-mail system? awr138?
    10·1 answer
  • Which forensics tool would you use to reveal recent pages viewed via the internet explorer browser?
    10·1 answer
  • ____ is the only automated disk-to-disk tool that allows you to copy data to a slightly smaller target drive than the original s
    5·1 answer
  • Write a program whose input is a string which contains a character and a phrase, and whose output indicates the number of times
    6·1 answer
  • A Raycast returns a float that tells you how far away an Object is
    8·1 answer
  • Deleting anitem from a linked list is best when performed using two pointersso that the deleted item is freed from memory.
    7·1 answer
  • few toffees were distributed among oriya , piyush and payal . priya got 3/8 , piyush and payal 1/8 and 1/2 of total toffees resp
    5·1 answer
  • I need the full code for 6.1.3 code hs circles and squares please answer please help
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!