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]
3 years ago
9

Write a program that dose the following:

Computers and Technology
1 answer:
Fynjy0 [20]3 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
Using a custom animation effect, how do you make text appear on a slide letter by letter?
solong [7]

Answer:

Apply an entrance effect, and then set it to By letter in the Effect Options dialog box.

Explanation:

PowerPoint application can be defined as a software application or program designed and developed by Microsoft, to avail users the ability to create various slides containing textual and multimedia informations that can be used during a presentation. Some of the features available on Microsoft PowerPoint are narrations, transition effects, custom slideshows, animation effects, formatting options etc.

To format an image on PowerPoint, you can either use the Artistic Effects or Picture Effects.

Some of the features available on Microsoft PowerPoint are narrations, transition effects, custom slideshows, animation effects, formatting options etc.

Basically, the views that are available on the Microsoft PowerPoint application includes;

1. Slide Sorter.

2. Notes Page.

3. Reading Pane.

4. Presenter view.

Using a custom animation effect, in order to make text appear on a slide letter by letter, you should apply an entrance effect, and then set it to By letter in the Effect Options dialog box.

3 0
3 years ago
Which of these does Open Office or Microsoft Office Wizard do?
irakobra [83]
Microsoft office wizard guides you thought the steps to complete a complex task
4 0
4 years ago
Which computer program can you use to write, edit, print, and perform any modifications to a document?
faltersainse [42]
D. word-processing software
4 0
4 years ago
Read 2 more answers
How many bits are necessary for a binary representation (unsigned) of:
pshichka [43]

Answer:

Hi!

The answer to:

a. 6 bits.

b. 9 bits.

c. 26 bits.

Explanation:

a. For the states of the U.S.A, you need 50 or more combinations to represents each element.

<u>If you use 6 bits, the possible combinations are 2⁶ = 64.  </u>

b. For days in a year, you need 365 or more combinations to represents each element.

<u>If you use 9 bits, the possible combinations are 2⁹ = 512. </u>

c. For inhabitants of California, you need 36,457,549 or more combinations to represents each element.

<u>If you use 26 bits, the possible combinations are 2²⁶ = 67,108,864.</u> If you use 25 bits instead of 26, then you have 2²⁵ = 33,554,432 combinations. These possible combinations are not enough to represent each inhabitant.

4 0
3 years ago
Which switch and network equipment modular connectors have replaced gigabit interface converters (gbics) as the modular connecto
Semenov [28]
The switch and network equipment modular connectors which have replaced gigabit interface converter as the modular connector of choice is small form - factor pluggable, abbreviated as SFP. It is hot swappable like GBICs but takes up very much less space and support all the networking standards that GBICs support.
5 0
4 years ago
Other questions:
  • Implement a container class Stat that stores a sequence of numbers and provides statistical information about the numbers. It su
    7·1 answer
  • // This pseudocode is intended to display // employee net pay values. All employees have a standard // $45 deduction from their
    12·1 answer
  • How to hard reset a iphone 7 without computer
    8·2 answers
  • Hardware consists of the physical devices associated with a computer system, where software is the set of instructions the hardw
    13·1 answer
  • Create a Quadrilateral, Oval, Triangle, Polygon class that are all extended from an abstract Shape class (given below). Then ext
    14·1 answer
  • Create another method: getFactorial(int num) that calculates a Product of same numbers, that Sum does for summing them up. (1,2,
    7·1 answer
  • An IT systems engineer creates a new Domain Name System (DNS) zone that contains pointer (PTR) resource records. Which zone type
    15·1 answer
  • How to find the next instance of text formatted in bold
    15·1 answer
  • PLEASE HELP ASAP what is the main purpose of electronic speed controller ESC
    9·2 answers
  • joe is in the planning stages to make sure that an upcoming company promotion during a major sporting event will not overwhelm h
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!