title: c++ Getting a date in MM DD YYYY format, and loop
body: <p>I am trying to write a program for my c++ class, I can't get the loop to work right and i'm lost on how to get the date. Any help would be appreciated. 
  Ok so i went ahead and updated the program and it fully "works" but it isnt aligning correctly, and when i try to define my name it isnt working, not sure what thats about. I mainly just need assistance with aligning the values into columns and with the dates being filled like 01 rather than 1</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  #include &lt;iomanip&gt;
  #include &lt;stdlib.h&gt;
  #defin studen name
  
  int main()
  {
      int ACCT, MM, DD, YYYY, PYMNM;
      double FEE, DWN, Tot, PYM;
      system("cls");
  cout&lt;&lt; "Dr.Thad Zalfolkz service fee's\n";
  cout&lt;&lt; "This program will ask you for your \n";
  cout&lt;&lt; "account number, consultation date\n";
  cout&lt;&lt; "treatment fee, and the initial payment.\n";
  cout&lt;&lt; "Then calculate a payment plan.\n\n";
  
  cout&lt;&lt;"Please input your account number: ";
  cin&gt;&gt; ACCT;
  while (ACCT&gt;9999||ACCT&lt;0){
  cout&lt;&lt; "\nError, input a valid account number.\n";
  cin&gt;&gt; ACCT;
  }
  cout&lt;&lt; "Please input the consultation date with a space between each. (MM DD YYYY)";
  cin&gt;&gt; MM;
  cin&gt;&gt; DD;
  cin&gt;&gt; YYYY;
  cout&lt;&lt;"Please input your treatment fee: $";
  cin&gt;&gt; FEE;
  while (FEE&lt;0){
  cout&lt;&lt; "\nPlear input a valid fee.\n";
  cin&gt;&gt; FEE;
  }
  cout&lt;&lt;"Please input your initial payment: ";
  cin&gt;&gt; DWN;
  while (DWN&lt;0){
  cout&lt;&lt; "\nPlear input a valid value.\n";
  cin&gt;&gt; DWN;
  }
  
  cout&lt;&lt;"Please input your desired monthly payment: ";
  cin&gt;&gt; PYM;
  cout&lt;&lt;"\n\n\n";
  while (PYM&lt;=0){
  cout&lt;&lt; "\nPlear input a valid value.\n";
  cin&gt;&gt; PYM;
  }
  
  cout&lt;&lt; "Patient account number:" &lt;&lt; ACCT&lt;&lt;endl;
  cout&lt;&lt; "Consultation Date:";
  cout&lt;&lt; MM;
  cout&lt;&lt;"/";
  cout&lt;&lt;DD;
  cout&lt;&lt; "/";
  cout&lt;&lt;YYYY&lt;&lt;endl;
  cout&lt;&lt; "Treatment Fee                   $"&lt;&lt;FEE &lt;&lt;endl;
  cout&lt;&lt; "Initial Payment               $"&lt;&lt;DWN &lt;&lt;endl;
  cout&lt;&lt; "Balance                         $"&lt;&lt;FEE-DWN &lt;&lt;endl&lt;&lt;endl;
  cout&lt;&lt; "Payment     Due     Payment     Total   Outstanding \n";
  cout&lt;&lt; "Number      Date    Amount      Paid    Balance \n";
  FEE=FEE-DWN;
  Tot=DWN;
  PYMNM=0;
  while(FEE&gt;0){
  
      if (FEE&lt;=PYM){ PYM=FEE;}
      if (MM=12){ 
      MM=1;  
      YYYY+1;
  }
      MM+1;
      ++PYMNM;
      FEE=FEE-PYM;
      Tot=Tot+PYM;
      cout&lt;&lt; PYMNM;
      cout&lt;&lt;"     ";
      cout&lt;&lt; MM;
      cout&lt;&lt;"/";
      cout&lt;&lt; DD ;
      cout&lt;&lt; "/";
      cout&lt;&lt; YYYY;
      cout&lt;&lt;"     ";
      cout&lt;&lt; PYM; 
      cout&lt;&lt;"     ";
      cout&lt;&lt; Tot;
      cout&lt;&lt;"     ";
      cout&lt;&lt; FEE;
      cout&lt;&lt;"     \n";
  
  }
   cout&lt;&lt;"=========================Payment schedule printed by: =============================";
  </code></pre>
  
  <p>}</p>