Debugme Eas230

Debugme Eas230 - a = pow x 2.0 b = sin a display if debugMe...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <iostream> #include <cmath> using namespace std; int main () { int x; double a, b, c; char hold; bool debugMe = true; // loop from 1 to 10000 for (x=1; x <= 10000; x++) { // for each value of x, calculate x-squared and sin of x-squared
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: a = pow( x, 2.0 ); b = sin( a ); // display if debugMe is true if (debugMe == true) { cout << x << " " << a << " " << b << endl; } } // display sin of last x-squared cout <<"after x = " << x << " b = " << b << endl; }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online