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
Marrrta [24]
2 years ago
9

Write a program that dose the following:

Computers and Technology
1 answer:
Fynjy0 [20]2 years ago
5 0

Answer:

#include<iostream>

#include<cmath>

using namespace std;

int main(){

   float num;

   float sum = 0.0;

   for(int i=1;i<=5;i++){

       cout<<"\nPlease enter the number: ";

       cin>>num;

       sum = sum + round(num);

   }

   float avg = sum/5;

   cout<<"The sum is: "<<sum<<endl;

   cout<<"The average is: "<<avg<<endl;

}

Explanation:

Create the main function and declare the variable 'num' and define the variable sum with zero.

Then, take a for loop and it runs for 5 times because of the condition i<=5.

print the message for the user on the screen, then the user enters the decimal value. After that, round the decimal number to the nearest integer.

we can use inbuilt function round(), which is defined in the cmath library and it takes the argument decimal.

For example:

round(5.89) it gives the integer 6.

Then, take the sum of all-rounded value and this process runs for 5 times. after that, take the average by dividing the sum by 5.

and then, print the sum and average value.

You might be interested in
Write a function:
Elden [556K]

Answer:

what are the choices

:"

Explanation:

5 0
2 years ago
Systems such as smartphones, appliances, game controllers, cable set-top boxes and automobiles that contain small computers are
Setler [38]

I guess the correct answer is Embedded system.

Systems such as smartphones, appliances, game controllers, cable set-top boxes and automobiles that contain small computers are called Embedded systems.

8 0
2 years ago
Modern ssds use a technique called "____" to spread write operations around the storage medium, thus evening out the impact of d
masha68 [24]

The question above has multiple choices as below;

<span>a.      </span>Wear aggregation.

<span>b.      </span>Wear mitigation.

<span>c.      </span>Wear prevention

<span>d.      </span>Wear leveling

The answer is d) Wear leveling.


This technique by some SSD controllers to increase the memory’s lifetime is called wear leveling. The mechanism for this principle is simple: distribute the entries for all the blocks evenly so that they will wear out evenly. Flash controller typically manages wear leveling and uses a wear leveling algorithm to control which physical block to use.







7 0
2 years ago
Moving your Sprite top to bottom is moving along the X coordinate?
Marianna [84]
The answer is false
6 0
3 years ago
A ________ power station uses the energy from a small piece of metal called Uranium ​
grigory [225]

Answer:

nuclear power plant

Explanation:

A nuclear reactor, or power plant, is a series of machines that can control nuclear fission to produce electricity. The fuel that nuclear reactors use to produce nuclear fission is pellets of the element uranium. In a nuclear reactor, atoms of uranium are forced to break apart.

3 0
3 years ago
Read 2 more answers
Other questions:
  • Adam discovers a virus on his system that is using encryption to modify itself. the virus escapes detection by signature-based a
    14·1 answer
  • Using a pin or password in addition to tpm is an example of what type of authentication?
    13·1 answer
  • If there is a slow internet connection or limited access to certain sites it is often better to _________ a video file before st
    9·2 answers
  • Tweaking existing technology in a new way is usually called _____. leveraged creativity state-of-the-art breakthrough applicatio
    5·1 answer
  • An IT professional with a customer-service
    13·1 answer
  • (14) Click on the
    7·2 answers
  • Write a paragraph discussing privacy issues on the internet<br> and their impact on human lives.
    9·1 answer
  • it refers to the ability of different parts of a computer to work together as one. please answer this​
    6·1 answer
  • What is computer system ?​
    9·2 answers
  • The ________ approach to motivation suggests a connection between internal physical states and outward behavior. achievement dri
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!