Questions:
C++ Shape pattern no 44
Explanation:
This problem is simple and just demonstration of nested loop. Below mention code is compiled in Visual Studio 2015 and output snap is attached.. If any problem you feel and want explanation feel free to contact.
Code:
Output:
Related Articles:
C++ Shape pattern no 44
Explanation:
This problem is simple and just demonstration of nested loop. Below mention code is compiled in Visual Studio 2015 and output snap is attached.. If any problem you feel and want explanation feel free to contact.
Code:
/**************************************************|
/*************C++ Programs And Projects************|
***************************************************/
#include<iostream>
using namespace std;
void main()
{
int i, j;
for (i = 0; i < 5; i++) {
for (j = 0; j < 3 * i - 2;
j++) {
cout
<< "*";
}
cout
<< endl;
}
}
Output:
Related Articles:
0 Questions:
Post a Comment