title: restart a program in C when "if" is used
body: <p>I continue to learn programming in C, and today I met a problem. 
  In my program, a user must enter a value of time in minutes, and my program will calculate it seconds(very simple, actually). But I want to set a rule, that time cannot be negative. So I used this code:</p>
  
  <pre><code>    if(a&lt;=0)
      {
          printf("Time cannot be equal to, or smaller than zero, so the program will now terminate\n");
          exit(EXIT_FAILURE);
      }
  </code></pre>
  
  <p>but now, I don`t want to terminate my program, I want it to return to the state when a user has to enter a value. </p>
  
  <p>I had a problem with terminating my program, but some search helped me, however I did not get any result searching how to restart my program.</p>
  
  <p>This is the text of my program(I am working on Linux):</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;stdlib.h&gt;
  main()
  {
      float a;
      printf("\E[36m");
      printf("This program will convert minutes to seconds");
      getchar();
      printf("Now enter your time in minutes(e.g. 5):");
      scanf("%f", &amp;a);
      printf("As soon as you will press the Enter button you`ll get your time in seconds\n");
      getchar();
      getchar();
  
  
      if(a&lt;=0)
      {
          printf("Time cannot be equal to, or smaller than zero, so the program will now terminate\n");
          printf("\E[0m");
          exit(EXIT_FAILURE);
      }
      else
      {
          float b;
          b=a*60;
          printf("\E[36m");
          printf("The result is %f seconds\n", b);
          printf("Press Enter to finish\n");
          getchar();
      }
      printf("\E[0m");
  }
  </code></pre>
  
  <p>P.S. I don`t know how to correctly name this function, so I call it restart, maybe it has a different name?</p>