How to make a multiplication table up to 10*10=100?
my syntax looks like this:
*/
// Includes
#include<iostream.h> // for << and >>
#include<iomanip.h> // for setw and setf
int main ()
{
cout.setf(ios::fixed, ios::floatfield); // Set up floating point
cout.setf(ios::showpoint); // output format
// Declaration and initialization of variables
int n1 = 1;
int n2 = 2;
// Main Function statements
for(n1=1; n1<=6; n1++)
{
cout << setw(5) << n1;
for(n2=(n2*n1); n2<=(n1*10); n2++)
{
cout << setw(5) << n2;
}
cout << endl;
}
return 0;
}// end main
and this is the output i get:
1 2 3 4 5 6 7 8 9 10
2
3
4
5
6
how do i fix this so the table fills in....and in the first "for" loop if i put
n1<=7
(or any digit more than 6)
it will look like a million numbers coming up