64 521
Assignments Done
99,3%
Successfully Done
In September 2018

# Answer to Question #49477 in C++ for AJ Cabredo

Question #49477
Help Please..!! C++ program that print a pattern..

**********
-********-
--******--
---****---
----**---

Only three to four for loops or it is okay if there is an if else statement..
#include <iostream>
using namespace std;
int main()
{
for(int i = 0; i < 5; i++)
{
for(int j = 0; j < i; j++)
cout << "_";
for(int j = 0; j < 2*(5 - i); j++)
cout << "*";
for(int j = 0; j < i; j++)
cout << "_";
cout << endl;
}
cin.get();
cin.get();
}
﻿

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

No comments. Be first!