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
vodomira [7]
3 years ago
12

Subana is writing a program which will calculate the mean average of a set of numbers by adding the numbers and dividing the res

ult by the amount of numbers. She will use a variable, avg, to store this average. Which variable type would be most suitable for avg?
Computers and Technology
1 answer:
Andre45 [30]3 years ago
5 0

Answer:

a variable of type "double" is more suitable for finding average because average could be any number with decimal places. we can't use a variable of type "integer" because it will omit the value after the decimal and will not produce satisfactory results.  

Explanation:

an example of C++ code is given to find the average of two numbers a and b

#include <iostream>;

using namespace std;

int main() {

double a = 2.334;

double b = 34;

double average =  (a + b) / 2;

cout << average;

return 0;

}

You might be interested in
What is local area network​
otez555 [7]

Explanation:

local area network is a computer network that interconnects computers within a limited area such as a residence, school, laboratory, university campus or office building. By contrast, a wide area network not only covers a larger geographic distance, but also generally involves leased telecommunication circuits.

<em><u>hope</u></em><em><u> </u></em><em><u>it</u></em><em><u> </u></em><em><u>helps</u></em>

3 0
3 years ago
Read 2 more answers
The limitations placed on employees in accordance with the company's policies and procedures
Anna71 [15]

Answer:

Answer is B!

Explanation:

I just took the quiz (:

5 0
3 years ago
Write a program with a method that plays the guess a number game. The program should allow the user to pick a number between 1 a
nlexa [21]

Answer:

Please check the explanation

Explanation:

That's the code and it is done with the program in c++ according to instructions given in the question using binary search. It can guess the correct number in 10 or fewer attempts and also shows the number of attempts it took to guess the number.

​ #include <iostream> using namespace std; int guess() { string input; int l = 1, h = 1000; int mid = (l + h) / 2, count = 0; while (1) { //count the number of attemts to guess the number ++count; //cout << count << "\n"; cout << "\n"; cout << "Is " << mid << " correct? (y/n): "; cin >> input; //if input is y print the guessed no. and return if (input == "y") { cout << mid << " guessed in " << count << " attempts!\n"; return 1; } //if input is n ask the user if it's higher or lower than current guess if (input == "n") { cout << "Is the number greater than or less than the number ? (h/l): "; cin >> input; } //if input is higher assign mid incremented by 1 to low //else decrement mid by 1 and assign to high if (input == "h") l = mid + 1; else h = mid - 1; //calculate mid again according to input by user again mid = (l + h) / 2; } } int main() { cout << "****WELCOME TO THE GUESS THE NUMBER GAME!****\n"; cout << "Guess any number between 1 to 1000.\n"; cout << "This game depends on user giving correct answers and not changing their number middle of game.\n"; guess(); } ​

8 0
3 years ago
By the definition of a computer, justify if a mobile phone and a calculator are computers or not​
likoan [24]

Answer:

It depends on the features of the Calculator but most mobile phones are computers.

Explanation:

A computer is an electronic device that can accept data (Both can), process the data (both can), produce the results of the processed data (both can) and store both result and initial data (some calculators can, some cannot but most mobile phones can).

In my opinion, they are computers but that's dependent on their features especially storage.

3 0
3 years ago
:A computer scientist creates an app that tells you a funny joke each time you touch the Joke button.
Harlamova29_29 [7]

Answer:

it has blue & red on each side

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • write an algorithm that gets the price for item A plus the quantity purchased. The algorithm prints the total cost, including a
    5·1 answer
  • A ____ is a type of program that uses a grid to organize and work with data.
    14·1 answer
  • Use of the internet to access programs and data on computers that’s are owned and managed by the other using large data centers.
    11·1 answer
  • Write the method makeNames that creates and returns a String array of new names based on the method’s two parameter arrays, arra
    9·1 answer
  • Does anyone know what anotmy means​
    8·2 answers
  • The ____ option must be used when running a program in order to see the results of assert statements.
    7·1 answer
  • ___are designed to infect and cause damage to operating system files, computer registry, and other locations on the motherboard
    15·1 answer
  • The speed density fuel injection system uses the blank sensor as the primary sensor as the primary sensor to determine base puls
    9·1 answer
  • I WILL GIVE BRAINIEST ANSWER AND THANKS IF YOU ANDWER THIS QUESTION!!!!
    8·1 answer
  • Why would a user want to resend a message? Check all that apply.
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!