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
Zinaida [17]
2 years ago
9

Create an array of 7 words,named "temperatures"containing daily temperatures for a week. Temperatures can be positive or negativ

e values. Write a program to count number of days of extreme temperature, that is, less than -10or greater than +25. You may allow the user to input the 7 temperatures, or hardcode it. But make sure that there are extreme temperatures. Display the number of days of extreme temperature
Computers and Technology
1 answer:
zepelin [54]2 years ago
3 0

Answer:

// program in C++.

// headres

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

   // array

   int temperatures[7];

   // count variable

   int count=0;

   cout<<"Enter the temperature of all days:";

   for(int a=0;a<7;a++)

   {

       // read temperature of 7 days

       cin>>temperatures[a];

       // find temperature is extreme or not

       if(temperatures[a]<-10||temperatures[a]>25)

       // count

       count++;

   }

   // print count of extreme temperature

   cout<<"number of days of extreme temperature:"<<count<<endl;

return 0;

}

Explanation:

Create an array of size 7 to store the temperature of all days of week.Read the temperature of each day.If the temperature is less than -10 or greater than 25 then increment the count.This will count the number of days of extreme temperature.Print  the count.

Output:

Enter the temperature of all days:-20 12 18 30 32 -15 15                                                                  

number of days of extreme temperature:4

You might be interested in
Suppose that you want to write a program that inputs customer data and displays a summary of the number of customers who owe mor
Allushta [10]

Answer:

The correct option is D = regionNumber

Explanation:

In this scenario we want to know customers who owe more than $1000 each, in each of 12 sales regions. And the customer data variables include name, zip-code, balanceDue and regionNumber; based on the customer data variables names and zip-code will not really affect our output. It is based on balanceDue that we increment the number of customer owing in a particular region (regionNumber).

Therefore, we would add 1 to an array element whose subscript would be represented by regionNumber since we are interested to know the number of customer owing in each of the 12 sales regions.

3 0
2 years ago
A search engine is aprogram to search......<br>​
coldgirl [10]
Yes it is. Why are you asking?
4 0
3 years ago
What are the methods used in research methodology?
earnstyle [38]
Experiments. ...
Surveys. ...
Questionnaires. ...
Interviews. ...
Case studies. ...
Participant and non-participant observation. ...
Observational trials. ...
Studies using the Delphi method.
5 0
2 years ago
10 computer and operating systems errors​
babunello [35]

Answer:

what is

Explanation:

3 0
2 years ago
Read 2 more answers
How many binary digits are in 10^100.
Basile [38]

Answer:

333 binary digits.

Explanation:

8 0
1 year ago
Other questions:
  • A _________ is the broadcast of various types of media over the web.
    10·2 answers
  • Okay so, not really a question but whatever it’s been bothering me.
    9·2 answers
  • It is always better to run over and give more information when you are giving a presentation versus quitting on time.
    11·2 answers
  • Given an int variable k, an int array incompletes that has been declared and initialized, an int variable studentID that has bee
    10·1 answer
  • Calculate the cash available to retire debt for each of the six months. There is cash available to retire debt if there is a cas
    8·1 answer
  • Create a text file named employee.dat containing the following data: b. Write a C++ program to read the employee.dat file create
    6·1 answer
  • 4.2 lesson practice last one plzs help
    5·2 answers
  • Inserting and deleting text is a basic editing task in word processing.<br><br> True or false
    6·2 answers
  • Which programming paradigm does the programming language JavaScript follow?
    14·1 answer
  • Phishing (pronounced fishing) is malware sent through e-mail that looks like a legitimate message from a trusted sender. The goa
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!