-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path5_20.cpp
More file actions
34 lines (31 loc) · 703 Bytes
/
5_20.cpp
File metadata and controls
34 lines (31 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include<iostream>
const int Cities = 5;
const int Years = 4;
int main()
{
using namespace std;
const char * cities[Cities]=
{
"Gribble City",
"Gribbletown",
"New Gribble",
"San Gribble",
"Gribble Vista"
};
int maxtemps[Years][Cities]=
{
{96, 100, 87, 101, 105},
{96, 98, 91, 107, 104},
{97, 101, 93, 108, 107},
{98, 103, 95, 109, 108}
};
cout<<"Maximum temperatures for 2008 - 2011\n\n";
for(int city = 0;city<Cities;++city)
{
cout<<cities[city]<<":\t";
for (int year=0;year<Years;++year)
cout<<maxtemps[year][city]<<"\t";
cout<<endl;
}
return 0;
}