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
A basic program to find the area of a square​
uranmaximum [27]

The area of a square is simply the square of the side. So, you only need to write a program that receives a number as input, which is the side of the square, and returns that number squared, which will be the area of the square.

You didn't specify any language, so for example here's a C implementation that receives the side from the user and returns the area:

#include <stdio.h>

int main()

{

   double side, area;

   

   do{

       printf("Enter the side of the square (must be >0): ");

       scanf("%lf", &side);

   } while(side<=0);

   area = side * side;

   printf("The area is %lf", area);

}

4 0
3 years ago
Software that enables the organization to centralize data is called A. Data Repository B. Data Base Management System C. Data Wa
balandron [24]

Answer:

B. Data Base Management System

Explanation:

A database management system (DBMS) can be defined as a collection of software applications that typically enables computer users to effectively and efficiently create, store, modify, retrieve, centralize and manage data or informations in a database. Generally, it allows computer users to efficiently retrieve and manage their data with an appropriate level of security.

Generally, a database management system (DBMS) acts as an intermediary between the physical data files stored on a computer system and any software application or program.

A data dictionary can be defined as a centralized collection of information on a specific data such as attributes, names, fields and definitions that are being used in a computer database system.

In a data dictionary, data elements are combined into records, which are meaningful combinations of data elements that are included in data flows or retained in data stores.

This ultimately implies that, a data dictionary found in a computer database system typically contains the records about all the data elements (objects) such as data relationships with other elements, ownership, type, size, primary keys etc. This records are stored and communicated to other data when required or needed.

Hence, a software that enables the organization to centralize data, manage the data efficiently while providing authorized users a significant level of access to the stored data, is called a Data Base Management System (DBMS).

4 0
2 years ago
A​ ___________ identifies the content and purpose of the​ visual, along with whatever label and number​ you're using to refer to
Westkost [7]

Answer:Title

Explanation: Title is basically considered as the "heading" or the "topic" that is used for giving the hint about the content or visual. In context with the visual ,which is the piece of display where title determines about the reason of visual and also hints about the content .It also gives the reference number that a person assign to the visual.

7 0
3 years ago
It is considered good practice to save a presentation before printing it. true false
Ilya [14]
It is true because it is really a good practise to save a presentation before printing it

5 0
2 years ago
Define a function print_feet_inch_short(), with parameters num_feet and num_inches, that prints using ' and " shorthand. End wit
Crazy boy [7]

def print_feet_inch_short(num_feet, num_inches):

#function named print_feet_inch_short takes in two arguments.

print(str(num_feet)+"'",str(num_inches)+"\"")

#output the feet and inch value supplied with the shorthand sign of feet and inch using string concatenation.

num_feet = int(input())

#allows user to specify a feet value and stores it in num_feet

num_inches = int(input())

#allows user to specify an inch value and stores it in num_inch

print_feet_inch_short(num_feet, num_inches)

#calling the function with the number of feets and inches given by user.

Learn more : brainly.com/question/18318709

4 0
3 years ago
Read 2 more answers
Other questions:
  • He would like to get rid of the graph. What will accomplish
    8·1 answer
  • Opportunity cost is the least desirable alternative given up as a result of a decision.
    6·1 answer
  • For homework, we have to figure out what's in the picture. It's " too close to tell " but I can't figure out what it is. Any ide
    11·1 answer
  • Odbc works on the ____ operating system.
    5·1 answer
  • Which of the following STEM discoverers is known for creating complex computational physics to develop computer models to simula
    7·1 answer
  • Oracion con punto focal​
    6·1 answer
  • The block of code below is supposed to display “multiple of 5” if the positive number value is in fact a multiple of 5
    8·1 answer
  • What set operator would you use if you wanted to see all of the Customers and the Employees including any records that may appea
    14·1 answer
  • Question
    5·1 answer
  • 1. A bank customer invested $24 in a bank with 5 percent simple interest per year, write a program the construct a table showing
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!