online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <cmath> #include <iomanip> using namespace std; int main() { setlocale(LC_ALL, "Rus"); double a = -2, b = -0.1, x, s, h, y, t, q; h = (b - a) / 10; int n; for (x = a; x <= b; x += h) { y = x * cos(x); s = x; t = x; q = -x * x; for (n = 1; n < 141; n++) { t = t * q / (2 * n * (2 * n - 1)); s += t; } cout << "y= " << y << setw(12) << "s= " << s << endl; } }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue