title: Loops in C++ to Check Wrong Input and to Start Program Again if user enters Correct Input
body: <p>I am new to c++. I have given assignment in which i have to calculate grades and ask input from the user. If he enter wrong input i have to start program again. If the user enters correct input i have to process data and again ask if he wants to check for another calculation.I have written this code so far. I don't know how to loop back again in the program if the user enters wrong input and to start program again if it is successful. Please Give me guidance over it. Thanks.</p>
  
  <pre><code>#include &lt;cstdlib&gt;
  #include &lt;iostream&gt;
  
  using namespace std;
  
  int main(int argc, char *argv[])
  {   
      //Declaring Variable
      char choice;
      char input;
      //Promptin User to Enter his/her Choice
      cout&lt;&lt;"Enter C or c for Computer Science: \n" ;
      cout&lt;&lt;"Enter S or s for Software Engineering: \n";
      cout&lt;&lt;"Enter T or T for Telecom Engineering: \n";
  
      cout&lt;&lt;"Select any option from the above Menu: ";
      cin&gt;&gt;input; 
  
  
  
      if (input != 'c' || input != 'C'){
  
          cout&lt;&lt;"Invalid input! Enter the correct input option again";
      }else if (input != 's' || input != 'S' ){
          cout&lt;&lt;"Invalid input! Enter the correct input option again";
      }else if (input != 't' || input != 'T' ){
          cout&lt;&lt;"Invalid input! Enter the correct input option again";
      }else if (input == 'a' || input == 'A'){
  
      }
  
  
  
  
  
      system("pause");
      return 0;
  
  }
  </code></pre>