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
xxTIMURxx [149]
3 years ago
14

Write afunction BalerAvg which calculate and display the average of aplayer (Baler), call this

Computers and Technology
1 answer:
podryga [215]3 years ago
8 0

<u>C program calculate and display the average of a player</u>

#include <stdio.h>

void BalerAvg(int runs,int balls )//Defining function

{

   double Avg=0.0;

   Avg= (double)(runs * 60)/(balls);//formula is given in question

   printf("Average is%f",Avg);//printing the average

}

int main() //driver function

{

      int runs=0,balls=0;

      printf("Enter runs given by the baler in an over\n");//taking input from user

      scanf("%d",&runs);

      printf("Enter the number of balls dilivered by the baler\n");

      scanf("%d",&balls);

      BalerAvg(runs,balls);//Calling Function

return 0;

}

<u>Output</u>

Enter runs given by the baler in an over  

5

Enter the number of balls dilivered by the baler  

69

Average is 4.347826

<u>Function BalerAvg which calculate and display the average of a player (Baler)</u>

void BalerAvg(int runs,int balls )//Defining function

{

   double Avg=0.0;

   Avg= (double)(runs * 60)/(balls);//formula is given in question

   printf("Average is%f",Avg);//printing the average

}

This is the function with the name BalerAvg of return type void having parameters runs and balls of integer type.This function is used to calculate the average of a player.  

You might be interested in
Universal Containers requires that all users add at least one Product Option from the Maintenance Feature to a bundle.
zmey [24]

Answer

Set the Max Options for “Maintenance” to be one. Set the Min Options to one & Max Options to two for “Support”.

Explanation:

the Admin set up these requirements for the user using Set the Max Options for “Maintenance” to be one. Set the Min Options to one & Max Options to two for “Support”. Since users must select at least one and no more than two Product Options from the Support Feature and Product Option from the Maintenance Feature to a bundle.

6 0
3 years ago
9.11: Array Expander
vodka [1.7K]

The Array Expander is an illustration of arrays and functions.

  • Arrays are variables that stores multiple values
  • Functions are named statements that are executed when called

<h3>The Array Expander program </h3>

The Array Expander program written in C++, where comments are used to explain each action is as follows:

#include <iostream>

using namespace std;

//This declares the Array Expander function

int* ArrayExpander(int *oldArr, int size){

   //This declares the new array

   int *newArr = new int[size * 2];

//This iteration sets values into the new array

   for (int i = 0; i < size * 2; i++) {

       if(i < size){

           *(newArr+i) = *(oldArr+i);

       }

       else{

           *(newArr+i) = 0;

       }

   }

//This returns a pointer to the new array

   return newArr;

}

//The main method begins here

int main(){

//This declares the length of the array, N

   int N;    

//This gets input for N

   cin>>N;

   int initArr[N];

//If N is between 1 and 50

   if(N > 0 && N <=50){

//This iteration gets values for the array

       for(int i = 0; i<N; i++){

           cin>>initArr[i];

       }

//This calls the Array Expander function

   int *ptr = ArrayExpander(initArr, N);

//This iteration prints the elements of the new array

   for (int i = 0; i < N*2; i++) {

       cout << ptr[i] << " ";

   }

   }

  return 0;

}

Read more abou C++ programs at:

brainly.com/question/27246607

3 0
2 years ago
Which of the following was not important in the development of the internet?
lesantik [10]
D. Rise of NASA.Hope I helped.
8 0
4 years ago
Read 2 more answers
A(n) ____________ is a private data network that creates secure connections over regular internet lines.
Setler79 [48]
VPN is the correct answer
5 0
4 years ago
Write an<br> algorithm for "How to Polish Your<br> Shoes".
sammy [17]

Answer:

Step 1- Start

Step 2- Take out your shoes

Step 3- Take out the shoe polish

Step 4- Put the shoe polish on your shoe

Step 5- Then polish your shoe

Step 6- Stop

hope this helps

6 0
3 years ago
Other questions:
  • Which loan type requires you to make loan payments while you’re attending school?
    10·1 answer
  • Help with this robotics hw pls
    5·1 answer
  • Your computer is configured to obtain an ipv4 address and dns server address automatically. what utility will help you to find t
    12·1 answer
  • Which industry has the highest employment figure for both teen and young adults in July, 2014?
    6·1 answer
  • The 7-bit ASCII code for the character ‘&amp;’ is: 0100110 An odd parity check bit is now added to this code so 8 bits are trans
    12·1 answer
  • Create a function called "strip_r_o" that takes in a STRING and strips all the Rs and Os from the string. Also use a FOR loop in
    7·1 answer
  • This is pixlr
    6·1 answer
  • Which of the following is a key difference between a Windows 7 restore point and one you set yourself?
    11·1 answer
  • ¿Es lo mismo hablar de tecnología que de computadora?
    12·1 answer
  • The startup routine runs,when machine boots up is known as​
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!