Loading...

Displays the following table.



Displays the following table using C++:
1
2  4
3  6    9
4  8  12  16
5  10  15  20  25


#include <iostream.h>
void main()
{
     for(int x=1; x<=5; x++)
     {
          for(int y=1; y<=x; y++)
          {
              cout<<x*y<<" ";
          }
         
          cout<<endl;
     }
}

Rate this posting:
{[['']]}

0 comments:

Post a Comment

 
TOP