/*
  While loops. See Nyhoff P132-133
  
  1) Try changing 1.01 to 0.9999 what happens?
*/

#include <iostream>
#include <cmath>
using namespace std;

/*
   while (loop condition)
     {
        statements ...
     }

   statements are repeated zero or more time until loop condition returns false.
*/

int main()
{
   double y=10000;
   while (y>1.01)
     {
        cout << "y=" << y << endl;
        y=sqrt(y);   
     }

   return 0;
}
