I need to write a program that inputs from the user a positive integer, say n, and any character, say c, and outputs to a file called "ass2.run" a solid isosceles triangle constructed with the character c, with its sides of size n and its right angle at the lower right corner. For example, if the inputs were 6 and the character "*" , the output file would look like:
Triangle: n=6, character =*
It needs to be right justified. Basically the opposite of what it looks like.
This part is for entering the number and character.
So far I have
Set up computer
void prompt ();
cout<< Enter a character:";
cin >> 'c';
This part is for the for loops. I need a total of 3 for loops.
for(int i=1; i<=n; i++)
for(int j=1; j<=n; j++)
I can't figure out the for loops for the spaces before the * symbol.
Finally, I cant figure out how to send the program to the ass2run file. Thanks for any help.