title: Rectangle of asterisks in C
body: <p>Program doesn't work and I don't know why. This is my first programming course and I'm having problem with nested loops. Our activity was to create a rectangle made from asterisks using loops. I've made a code but only the loop inside the loop works. 
  Here is my code</p>
  
  <pre><code>int main()
  int a,b,i;
  printf("Input length:");
  scanf("%d",&amp;a);
  printf("Input width:");
  scanf("%d",&amp;b);
  
  for(i=1;i&lt;b;i++){
  for(i=1;i&lt;b;i++){
  printf("*");}
  printf("\n");}
  return 0;}
  </code></pre>
  
  <p>My problem is that printf("\n") does not work in my code. Can you guys help me out?</p>