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
AlekseyPX
3 years ago
7

Write a program that asks the user to enter ten temperatures and then finds the sum. The input temperatures should allow for dec

imal values. Sample Run Enter Temperature: 27.6 Enter Temperature: 29.5 Enter Temperature: 35 Enter Temperature: 45.5 Enter Temperature: 54 Enter Temperature: 64.4 Enter Temperature: 69 Enter Temperature: 68 Enter Temperature: 61.3 Enter Temperature: 50 Sum = 504.3
Computers and Technology
1 answer:
Anna35 [415]3 years ago
4 0

Answer:

#include <iostream>

#include <conio.h>

using namespace std;

main()

{

float temp[10], sum;

sum=0;

for (int i=1 ; i<= 10; i++)

{

cout<<"Enter the temperature in Decimal for temp"<<i<<"=";

cin>>temp[i];

}

for (int j=1 ; j<=10 ; j++)

{

sum = sum+temp[i];

}

cout<< "/nThe Total Temperature ="<<sum;

getch();

}

Explanation:

In this program we can take values of temperature in decimal values by taking the data type of temp variable as float. Array is used to enter the ten temperature values. Sum variable is used to add all the values.

You might be interested in
The means by which an operating system or any other program interacts with the user is called th
natulia [17]
Networking capabilities of a computer
7 0
3 years ago
Write a program that records high-score data for a fictitious game. the program will ask the user to enter five names, and five
Harman [31]

Scores.cpp

#include <iostream>

#include <string>

using namespace std;

void initializeArrays(string names[], int scores[], int size);

void sortData(string names[], int scores[], int size);

void displayData(const string names[], const int scores[], int size);

int main()

{

   string names[5];

   int scores[5];

   //reading names and scores

   initializeArrays(names, scores, 5);

   //sorting the lists based on score.

   sortData(names, scores, 5);

   //displaying the contents of both arrays

   displayData(names, scores, 5);

 

  return 0;

}

void initializeArrays(string names[], int scores[], int size){

   for(int i=0; i<size; i++){

       cout<<"Enter the name for score #"<<(i+1)<<": ";

       cin >> names[i];

       cout<<"Enter the score for score #"<<(i+1)<<": ";

       cin >> scores[i];

       }

}

void sortData(string names[], int scores[], int size){

   

       int temp = 0;

       string tempStr = "";

       

       for(int i=0; i < size; i++){

               for(int j=1; j < (size-i); j++){

                      //checking max score and sorting based on it.

                       if(scores[j-1]< scores[j]){

                               //swap the elements!

                           //swapping scores

                               temp = scores[j-1];

                               scores[j-1] = scores[j];

                               scores[j]=temp;

                               

                               //swapping names

                               tempStr = names[j-1];

                               names[j-1] = names[j];

                               names[j]=tempStr;

                       }

                       

               }

       }

}

void displayData(const string names[], const int scores[], int size){

   cout<<"Top Scorers:"<<endl;

       //printing the elements up to the size of both arrays.

       for(int i=0; i<size; i++){

           cout<<names[i]<<": "<<scores[i]<<endl;

       }

}

3 0
3 years ago
Which of the following is not an interconnector?
igor_vitrenko [27]

The following is not an interconnector :

A wireless keyboard jack

Explanation:

  • An interconnector is a structure which enables energy to flow between networks.
  • An electrical or optical connection or cable that connects two separate devices.
  • Since a wireless device does not have a cable connecting the two, they are not an interconnector.
  • The cable that connects your monitor or hard drive to the computer system is called an interconnect.
  • Switches can be used to connect together a number of end-user devices such as workstations, or to interconnect multiple network segments.
  • A standard computer system will contain multiple interconnects.
3 0
3 years ago
Which skill type refers to the ability to interact and communicate effectively with people?
sukhopar [10]
Softskills refer to the ability to interact and communicate effectively with people.
3 0
3 years ago
reagan's firm has not had to make large investments in computer or networking hardware or in personnel to maintain the hardware
Kaylis [27]

The usage of hosted services such data storage, servers, databases, networking, and software through the internet is referred to as cloud computing.

Since the advent of cloud computing, the number of cloud-based IT services and apps has exploded around the globe and is still growing. By 2021, practically all of the small and major applications we use will be stored in the cloud, saving us money, time, and storage space. The sorts of cloud computing are covered in this article, along with ten trends to look out for in 2021. The back-end layer is composed of computers, servers, central servers, and databases, as well as software. This layer, which is the foundation of the cloud, is only in charge of safely storing data.

Learn more about database here-

brainly.com/question/6447559

#SPJ4

6 0
1 year ago
Other questions:
  • ________ hackers break into systems for non-malicious reasons such as to test system security vulnerabilities. black-hat gray-ha
    10·1 answer
  • In a program called Nature's Notebook, citizen volunteers make and report observations about seasonal changes in plants and anim
    15·1 answer
  • Please answer fast screenshot included - thanks in advance
    11·1 answer
  • Which of the following hacker attacks against wireless networks are virtually undetectable?
    12·1 answer
  • Hey I don’t have a question I’m just testing something on this app
    6·2 answers
  • Jeremy wishes to create a site map for his website. What tag will surround the URL of his home page?
    9·1 answer
  • Multiple Choice
    9·1 answer
  • What is the gear ratio?
    12·1 answer
  • Write a program whose inputs are three integers, and whose output is the smallest of the three values. Ex: If the input is: 7 15
    5·1 answer
  • Jill is configuring the AutoArchive feature in Outlook 2016. What is the default setting in relation to when AutoArchive
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!