c++ question
Go to solution
Solved by madknight3,
thanks for the help
I did find a way to fix it ... here how I did it
But that doesn't print it reversed like you wanted. You want to do this to print it reversed
string(num - newa, '*');
Alternatively you can reverse the loop
for(newa = num; newa >= 0; newa--) // goes from num to zero instead of zero to num{ cout<<string(newa,'*'); // isn't changed because we reverse the loop cout<<endl;}

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now