Why won't it move to next line? (C) (I'm bad at programming haha)

I'm new to C in Visual Studio 2015 and I am working on a code where I need to make 8 patterns made out of "*" using only 1 printf("*");, printf(" "); and printf("\n"); per each pattern. I have the first 3 patterns done correctly and displayed in the code provided; however, patterns 2 and 3 are combined and not seperated by a line using \n didn't do anything and can't use more then one per pattern. (Did I maybe do the "for's" wrong because I sorta just copied and pasted then edited these patterns so not sure if you can put for's in the way I did. Thanks for any help!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
 #define _CRT_SECURE_NO_DEPRECIATE
#include <stdio.h>
#include <math.h>

void main()
{
	int r, s, a; // r = row, s = space, a = star

	for (r = 0; r < 4; r++)									// Pattern 1
	{
	for ( a = 0 ; a < 10; a++)
		{
			printf("*");
		}
		printf("\n");
	}

	for (r = 0; r <= 6; r++)								// Pattern 2
	{
	for (a = 0; a < r; a++)
		{
			printf("*");
		}
		printf("\n");
	}

	for (r = 0; r < 5; r++)									// Pattern 3
	{
	for (a = 0; a < 9-r*2; a= a + 1)
		{
			printf("*");
		}
		printf("\n");
	}
}
you have to put another printf("\n"); between patters else the patterns will look like they are concatenated
I can only use one printf ("\n") for each pattern
Topic archived. No new replies allowed.