C++ Programs to print integers Pattern
#include <iostream>
using namespace std;
void intPattern(int n)
{
for (int i = 0; i < n; i++) {
for (int j = 0; j <= i; j++) {
cout << "* ";
}
cout << endl;
}
}
int main()
{
int n = 5;
intPattern(n);
return 0;
}
Comments
Leave a comment