The instructor said I would need a loop. Can you give me an example of what I need to do?At the rate I am going I will be here all night. What I am doing is wrong I think.
Code:
6 #include <stdio.h>
7
8 int main(void)
9
10 {
11
12 int height, width;
13
14 printf("Enter width:");
15 scanf("%d", &width);
16 printf("Enter height:");
17 scanf("%d", &height);
18
19 if (width == 4)
20 printf("****/n");
21 else if (width == 5)
22 printf("*****/n");
23 else if (width == 6)
24 printf("******/n");
25 else if (width == 7)
26 printf("*******/n");
27 else if (width == 8)
28 printf("********/n");
29 else if (width == 9)
30 printf("*********/n");
31 else if (width == 10)
32 printf("**********/n");
33 else if (width == 11)
34 printf("***********/n");