int main() {  
    float x = 90 * 3.1415 / 180;  
  
    double prevSinX = 0., sign = -1.0, sinX = x, common = x;  
    unsigned i = 2;  
  
    while (abs(sinX - prevSinX) > 0.0001) {  
        prevSinX = sinX;  
        common *= x * x / double((2 * i - 1) * (2 * i - 2));  
        sinX += sign * common;  
        sign *= -1.0;  
        i++;  
    }  
  
    std::cout << sinX << std::endl;  
}