subject

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; }

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 09:00
What provides an array of buttons for quick access to commonly used commands and tools
Answers: 1
question
Computers and Technology, 24.06.2019 01:00
What are two ways to access the options for scaling and page orientation? click the home tab, then click alignment, or click the file tab. click the file tab, then click print, or click the page layout tab. click the page layout tab, or click the review tab. click the review tab, or click the home tab?
Answers: 2
question
Computers and Technology, 24.06.2019 14:30
In a home that has 120 v service, there is an electric appliance that has a resistance of 12 ohms. how much power will this appliance consume? a. 10 w b. 120 w c 1200 w d. 1440 w
Answers: 1
question
Computers and Technology, 25.06.2019 03:00
Between 1932 and 1938, chester carlson developed a process that enabled a "picture" of a document to be taken and then have it reproduced on another
Answers: 1
You know the right answer?
Program to store temperature of two different cities for a week and display it.#include using namesp...
Questions
question
Mathematics, 23.03.2021 21:00
question
Mathematics, 23.03.2021 21:00
question
Mathematics, 23.03.2021 21:00
question
Chemistry, 23.03.2021 21:00
question
Mathematics, 23.03.2021 21:00
Questions on the website: 13722360