Five sets of 3 double numbers stored in a 5x3 array in C++,
How do i do this, I have this so far
include <iostream>
# include <iomanip>
# include <cstring>
# include <cstdlib>
using namespace std;
int main ()
{
const int NUMROWS = 5;
const int NUMCOLS = 3;
int i, j;
int val [NUMROWS] [NUMCOLS] = {num};
cout << "\nDisplay using nested for loop: " << endl;
for (i = 0; i < NUMROWS; i++)
{
cout << endl;
for (j = 0; j < NUMCOLS; j++)
cout << setw(4) << val[j];
}
cout << endl;
return 0;
}
jcflore3 0 Newbie Poster
John A 1,896 Vampirical Lurker Team Colleague
may4life 2 Junior Poster in Training
may4life 2 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.