1
22
333
4444
55555
Code:-
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
int i,j;
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
cout<<i;
}
cout<<"\n";
}
return 0;
}
22
333
4444
55555
Code:-
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
int i,j;
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
cout<<i;
}
cout<<"\n";
}
return 0;
}
No comments:
Post a Comment