Hello. I'm just beginning learning C++ and I'm having a problem with simple division. First, here's the code that I'm having a problem with. . .

Code:
#include<iostream>
 
int main()
{
double number = 1;
while(1)
  {
  double eight = .125*number;
  double one = 1;
  double seven = 7;
  double fract = one/seven;
  double seventh = fract * number;
  double test = 4100 + seventh + eight;
  std::cout << number << " " << seventh << " " << eight << " " << test << std::endl;
     if (test == number)
     break;
  number+=1;
  }
return 0;
}
The program works, but I'd like to know how to simply divide one by seven without having to define them as doubles first. For such a small program, it really doesn't make a difference but I want to know why something like the following doesn't work. . .

Code:
double test = 4100 + ((1/7)*number) + ((1/8)*number);
Finally, if it's not too much trouble, can someone explain the right way to do the following? I'm pretty sure that this isn't the right way.

Code:
while(1)
{
//code
}
Thank you very much.

-Matt