Code:
#include<iostream>
using namespace std;
void main()
{
for(int i = 1;i<=5;i++)
{
for(int j = 1;j<=i;j++)
{
cout<<j;
}
cout<<endl;
}
}
Output:
#include<iostream>
using namespace std;
void main()
{
for(int i = 1;i<=5;i++)
{
for(int j = 1;j<=i;j++)
{
cout<<j;
}
cout<<endl;
}
}
Output:
0 Questions:
Post a Comment