Okay. Okay...
I seriously shouldn't give you the completed code, because that would be no fun. However, here's a few tips I can give...
1: Exclude <string>, as you don't need it.
1.1: Optionally, use <stdio.h>. I personally like it a LOT more.
1.2:
cin >> num >> endl;
would look like
scanf("%d",num);
with stdio.h.
2: TYPE CHECKING. If someone enters "five" instead of 5, your program is screwed. Although considering who you're showing this program to, it
might not be mandatory.
3: The for loop should look like this...
1 2 3 4
|
for (int i = 0; i < num; i++)
{
//insert your printfs or couts here.
}
|
3.1: The while loop would look like this...
1 2 3 4 5 6
|
int i = 0;
while (i < num)
{
//insert your printfs or couts here.
i++;
}
|
4: Don't forget to
return 0
.
4.1: If you don't want to return anything,
use void main()
you have to return something. Even if it's 0.
Hope that helped!
P.S.- Varying the position of the stairs calls for another for loop within the for loop.