title: Simple while-loop
body: <p>My code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  int main(void){
  char input;
    while(1){
        printf("Repeat? [Y/N] ");
        scanf("%c", &amp;input);
        if(input=='N' || input=='n'){
            break;
        }
    }
    return 0;
  }
  </code></pre>
  
  <p>Expected output:</p>
  
  <pre><code>Repeat? [Y/N] y
  
  Repeat? [Y/N] y
  
  Repeat? [Y/N] n  //Program terminated
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Repeat? [Y/N] Repeat? [Y/N] y
  
  Repeat? [Y/N] Repeat? [Y/N] y
  
  Repeat? [Y/N] Repeat? [Y/N] n //Program terminated
  </code></pre>