Uh. Hi. I'm new to this board, and very new to C++. Some concepts are hard for me to understand... Right now I'm learning about loops... like, for, if, else, so and so. I have to complete a few excersices for "homework" If you will. I need to create the following using the For loop. I really need help on 2-4... I figured 1 out easily. Thanks in advance.
1)
*****
****
***
**
*
Now the following is what I need help with.Code://code I used for above #include<stdio.h> #include<conio.h> void main() { int i, j; for(i=5; i>=1; i--) { for(j=1; j<=i; j++) { printf(" * ",j); } printf("\n"); } getch(); } //Really simple...
2)
****
--***
---**
----*
3)
-*
-***
****
4)
1
101
1010
10101
Of course, I don't want you to do any of the work for me... but maybe an example or two with a different scenario, or just maybe some tips will help me on my way. I don't know much in C, so please try to stick to the most basic functions, like printf, scanf, and loops, like if, else and for. I know I could just do printf and get the same output... but that's not the point of the exercise. Again, Thanks in Advance! Oh, and teh dashes, they stand for SPACE...
-ddy02