Write a C++ program that asks the user to enter an integer N and display N lines as follows. On line i, display i dollars ($), followed by a single pound (#) character. For example, line 0 will have 0 dollars signs followed by a pound sign. Line 1 will have 1 dollar sign followed by a pound sign. As an example, for N=6, the pattern should look as follows. Hint: Use nested for loops.
#
$#
$$#
$$$#
$$$$#
$$$$$#
$$$$$$#
This is all I have so far, and I'm unclear how to progress.
1 2 3 4 5 6 7 8 9 10 11
#include <iostream>
usingnamespace std;
int main()
{
int N
cout<<"Enter an integer:"<<endl;
cin>>N>>endl;
for(int line = 0; N >= 0; line++)
You need one for loop that will print the specified number of lines.
Then inside that for loop, you need a nested for loop that will print the required number of $.
Line 11: your termination condition is bogus. Your loop will never stop as long as the user enters a non-negative number.