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
|
#include <iostream>
#include <iomanip>
using namespace std;
const int NUMROWS = 1;
const int NUMCOLS = 26;
void display(int [NUMROWS][NUMCOLS]); // function prototype
int main()
{
int val[NUMROWS][NUMCOLS] = {{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}};
string words[NUMROWS][NUMCOLS] = {{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}};
display(words);
return 0;
}
void display(int nums[NUMROWS][NUMCOLS])
{
int rowNum, colNum;
for (rowNum = 0; rowNum < NUMROWS; rowNum++)
{
for(colNum = 0; colNum < NUMCOLS; colNum++)
cout << setw(4) << nums[rowNum][colNum];
cout << endl;
}
return;
}
|