使用for()嵌套循环输出二维数组

// ex5-20.cpp : 定义控制台应用程序的入口点。
//

#include "stdafx.h"
#include 
const int citys=5;
const int year=4;

int _tmain(int argc, _TCHAR* argv[])
{
	using namespace std;
	const char * city[citys]=
	{
		"Beijing",
		"Shanghai",
		"Nanjing",
		"Tianjin",
		"Aomen  "
	};
	int maxtemps[year][citys]=
	{
		{33,24,23,14,15},
		{34,5,234,5,34},
		{34,5,34,65,42},
		{12,23,4,31,12}
	};
	cout<<"max temps\n\n";
	for (int i=0;i

你可能感兴趣的:(c++学习历程)