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
KengaRu [80]
4 years ago
9

Program to store temperature of two different cities for a week and display it.#include using namespace std; const int CITY = 2;

const int WEEK = 7; int main() { int temperature[CITY][WEEK]; cout << "Enter all temperature for a week of first city and then second city. \n"; // Inserting the values into the temperature array for (int i = 0; i < CITY; ++i) { for(int j = 0; j < WEEK; ++j) { cout << "City " << i + 1 << ", Day " << j + 1 << " : "; cin >> temperature[i][j]; } } cout << "\n\nDisplaying Values:\n"; // Accessing the values from the temperature array for (int i = 0; i < CITY; ++i) { for(int j = 0; j < WEEK; ++j) { cout << "City " << i + 1 << ", Day " << j + 1 << " = " << temperature[i][j] << endl; } } return 0; }
Computers and Technology
1 answer:
Naddik [55]4 years ago
5 0

Answer:

Your solution is correct. Let me explain how it works so that it will be clearer for you

Explanation:

Two constant values are defined for city and week

The 2D temperature array is declared taking the city as rows and week as columns, rows will hold the cities and columns will hold the temperature for the day of the city

A nested for loop is created to initialize all the elements in the array using cin function to assign values accordingly

When the first loop is done, another nested for loop is created to output the all the elements in the array

You might be interested in
A national tax preparation firm is accessing industry-specific productivity applications in the cloud; many other tax preparatio
Andreas93 [3]

Answer:

software as a service(SaaS) model

Explanation:

This is because the software applications are accessed over the internet meaning no need for infrastructure installation and maintenance.

8 0
4 years ago
Which language paradigm interacts well with database systems in business environments that use SQL?
HACTEHA [7]
The answer is C, can you mark me brain
6 0
3 years ago
A money ____ refers to moving a cash amount from one account to another.
Julli [10]
Money Transfer.
HOPE THIS HELPS!
5 0
3 years ago
Read 2 more answers
Photographs, illustrations, and videos are increasingly created an and viewed in digital formats. True or False​
lutik1710 [3]

Answer:

I think it's True but I don't know sorry if I'm wrong

6 0
3 years ago
Read 2 more answers
A technician replaces a defective 250GB hard drive in a desktop with a 2TB hard drive. After installation, the computer detects
FinnZ [79.3K]

Answer:

D. Flash the BIOS

Explanation:

The function of the BIOS is to test all computer hardware that is attached to a machine before loading the operating system. Since the bios contains firmware that enables the configuration of computer hardware. when the 2 TB hard drive is connected the technician should update the program stored on the BIOS chip in other words flash the bios for it to be able to read the new hard drive. Reinstalling the drive will not make a difference as long as the BIOS still detects the 250 GB hard drive.

6 0
4 years ago
Other questions:
  • Holly Carpenter argues that technology may actually prevent some kinds of evolution that would benefit humans. Do you agree with
    8·2 answers
  • You created a vm and installed windows server 2008 r2 over the network, using pxe boot. when you start the vm, it doesn't attemp
    7·1 answer
  • What are three reasons teens might start drinking alcohol??
    7·2 answers
  • _____________ data is what is translated to digital format so it can be stored in a computer.
    10·1 answer
  • There are many different types of documents that are used to convey information in the business world-letters and
    12·1 answer
  • How do i do a class in java??
    5·1 answer
  • The best way to ensure the accuracy and safety of your accounts is to:
    10·1 answer
  • Develop a program that will maintain an ordered linked list of positive whole numbers. Your program will provide for the followi
    13·1 answer
  • Write a java program to find the perimeter of a triangle with sides measuring 10cm, 14cm and 15 cm.
    8·1 answer
  • Я люблю есть гнезда петух
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!