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
In a circular linked list the last node points to the____ node.
horsena [70]

Answer: option A) First

In a circular linked list the last node points to the first node.

Explanation: As in a circular linked list, the node will point to its next node. Since the node next to last node is the first node hence last node will point to first node in a circular way. The elements points to each other in a circular path which forms a circular chain.

4 0
4 years ago
What is the term for movement in particular direction
gladu [14]
The term would be: Velocity 
Velocity is the speed of an object in a particular direction. 
4 0
3 years ago
Read 2 more answers
Bob's Assembly is a hardware manufacturer. It specializes in builders' hardware for doors, cabinets, windows, and bathrooms. Bob
Snezhnost [94]

Answer:

distinctive competence

Explanation:

The distinctive competence denotes the various characteristic of certain business on which behalf that business perform better than its competitors. And since the business succeeds in doing those things better than its competitors, that business gains a competitive advantage over its competitors. And here, Bob's assembly is a hardware manufacturer for the doors, cabinets, windows and the bathrooms. And his assembly products are more durable and economical than its competitor's products. And thus Bob has a competitive advantage over its competitors.

3 0
4 years ago
If there is a combination of two or more attributes which is being used as the primary key then we call it as
Hunter-Best [27]

Answer:

Composite Keys.

.....Wubba Lubba Dub-Dub :))

5 0
3 years ago
Stores of data that are so vast that conventional database management systems cannot handle them, and very sophisticated analysi
Colt1911 [192]
Maybe an international database, where all nations are invited to contribute information, THEREFORE, there would be a vast amount of data.
5 0
3 years ago
Other questions:
  • Explain the advantages of taking the aspire test
    15·1 answer
  • Computer architecture:
    6·1 answer
  • The crash rate per mile is ..
    12·2 answers
  • What is a row of data in a database called?<br> Field<br> File<br> Record<br> Title
    10·1 answer
  • What is Deep learning
    9·1 answer
  • What is a form of a stationary mouse on which the movement of a finger causes the pointer on the screen to move?
    7·1 answer
  • g (Locate the largest element) Write the following method that returns the location of the largest element in a two-dimensional
    11·1 answer
  • 4.3 Code Practice<br> edhisve
    13·1 answer
  • 4.
    8·1 answer
  • unlike the barcode-based tracking system, a radio frequency identification system offers a .
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!