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
Which best describes how information is sent on the internet?
V125BC [204]

Answer:

a. The information is first sent via a Broadband for efficient transmission, and if not successful, only then it is resent via a Baseband that exists as a backup network as packets b. The message is first broken down into small packets before being sent, then they are

Explanation:

8 0
1 year ago
What is the inverse function of d(x ) = -2x - 6?
PtichkaEL [24]

Answer:

-\frac{x}{2} - 3

Explanation:

d(x) = -2x - 6

to find the inverse of a function, you need to follow these steps:

1. set d(x) = y

2. interchange the variables, so y becomes x and x becomes y

3. solve the equation for y

<u>step 1:</u> set d(x) = y

y = -2x -6

<u>step 2:</u> interchanging the variables

y = -2x - 6 turns into x = -2y - 6

<u>step 3:</u> solving for y

x = -2y - 6 < add 6 to both sides to get rid of it on the right

x + 6 = -2y < divide both sides by -2 to get y alone

x + 6 / -2 = -\frac{x}{2} - 3

-2y / -2 = y

-\frac{x}{2} - 3 = y

so the inverse of the function is -\frac{x}{2} - 3

7 0
3 years ago
Write a Java class called BankAccount (Parts of the code is given below), which has two private fields: name (String) and balanc
NemiM [27]

Answer:

Here is the Bank Account class:

public class Bank Account {   //class definition

   private String name;  //private String type field to hold name

   private double balance;    // private double type field to hold balance

    public Bank Account(String name, double balance) {  // parameter constructor that takes

//this keyword is used to refer to the data members name and balance and to avoid confusion between name, balance private member fields and constructor arguments name, balance

 this.name = name;  

 this.balance = balance;  }    

   public void deposit(double amount) {   //method to deposit amount

               balance = balance + amount;     }    // adds the amount to the account causing the current balance to increase

   public void withdraw(double amount) {  //method to withdraw amount

 balance = balance - amount;   }   //subtracts the amount causing the current balance to decrease

    public String toString() {  // to display the name and current balance

              return name + " , $" + balance; }  } //returns the name and the current balance separated by a comma and dollar

Explanation:

The explanation is provided in the attached document due to some errors in uploading the answer.

3 0
2 years ago
This rlly isnt a question but give me some movies to watch or netflix movies/shows to watch
katovenus [111]
White chicks is a good one
5 0
2 years ago
Read 2 more answers
What is the difference between business strategies and business models?
bogdanovich [222]

Answer:

A . Business strategies include long-term business plans, while business models include plans for daily business functions

7 0
2 years ago
Other questions:
  • What is the magnitude of the largest positive value you can place in a bool? a char? an int? a float?
    14·1 answer
  • Write a class named Averager containing: An instance variable named sum of type integer, initialized to 0. An instance variable
    6·1 answer
  • The adjustable contact of a potentiometer is placed at the center of its adjustment. If the total resistance is 5 kOhms, what is
    9·1 answer
  • A very simple device that connects network components and sends packets of data to all other connected devices is called a _____
    5·1 answer
  • You are the administrator of the Sybex website. You are working when suddenly web server and network utilization spikes to 100 p
    15·1 answer
  • Identify similarities and differences of hibiscus leaves <br>​
    14·1 answer
  • Could you give me Aidan Gallagher's wuasp number​
    5·2 answers
  • Need answer ASAP.
    8·1 answer
  • ¿Es aquel panel que controla la estructura de la tabla dinámica?
    14·2 answers
  • How to count the total number of users from backend reactjs.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!