Hello, I need help displaying this pattern by using loops and only putting one multiplication sign on in a cout statement.
* *
*** *
***** *
******* *
********* *
-Okay this pattern isn't displaying correctly when I post it. All the stars have to be aligned on the right side.
This is what I have done so far, but I am having trouble getting the pattern. Thanks in Advance.
Code:#include <iostream> using namespace std; int main () { for (int row = 0; row <5; row++) { for (int star = 0; star < 10; star++) { cout<<'*'; if(star == 1) break; } cout<<" "<<'*'; cout<<endl; } return 0; }