#include <iostream> using namespace std; int main() { cout << "OVERDAMPED" << endl << endl; for (double b = 0; b <= 19; b++) { for (double c = -19; c < 0; c++) { if (sqrt((b * b) - (4 * c)) == floor(sqrt((b * b) - (4 * c))) && (b * b) - (4 * c) != 0) { if (b == 0) { cout << "y'' + " << b << "y' - " << -c << "y = f(x)" << endl; } else { cout << "y'' +/- " << b << "y' - " << -c << "y = f(x)" << endl; } } } for (double c = 0; c <= 19; c++) { if (sqrt((b * b) - (4 * c)) == floor(sqrt((b * b) - (4 * c))) && (b * b) - (4 * c) != 0) { if (b == 0) { cout << "y'' + " << b << "y' + " << c << "y = f(x)" << endl; } else { cout << "y'' +/- " << b << "y' + " << c << "y = f(x)" << endl; } } } } cout << endl << "CRITICALLY DAMPED" << endl << endl; for (double b = 0; b <= 19; b++) { for (double c = -19; c < 0; c++) { if ((b * b) - (4 * c) == 0) { if (b == 0) { cout << "y'' + " << b << "y' - " << -c << "y = f(x)" << endl; } else { cout << "y'' +/- " << b << "y' - " << -c << "y = f(x)" << endl; } } } for (double c = 0; c <= 19; c++) { if ((b * b) - (4 * c) == 0) { if (b == 0) { cout << "y'' + " << b << "y' + " << c << "y = f(x)" << endl; } else { cout << "y'' +/- " << b << "y' + " << c << "y = f(x)" << endl; } } } } cout << endl << "UNDERDAMPED" << endl << endl; for (double b = 0; b <= 19; b++) { for (double c = -19; c < 0; c++) { if (sqrt((4 * c) - (b * b)) == floor(sqrt((4 * c) - (b * b))) && (b * b) - (4 * c) != 0) { if (b == 0) { cout << "y'' + " << b << "y' - " << -c << "y = f(x)" << endl; } else { cout << "y'' +/- " << b << "y' - " << -c << "y = f(x)" << endl; } } } for (double c = 0; c <= 19; c++) { if (sqrt((4 * c) - (b * b)) == floor(sqrt((4 * c) - (b * b))) && (b * b) - (4 * c) != 0) { if (b == 0) { cout << "y'' + " << b << "y' + " << c << "y = f(x)" << endl; } else { cout << "y'' +/- " << b << "y' + " << c << "y = f(x)" << endl; } } } } cout << endl << endl; return 0; }
Standard input is empty
prog.cpp: In function ‘int main()’:
prog.cpp:12:8: error: ‘sqrt’ was not declared in this scope
if (sqrt((b * b) - (4 * c)) == floor(sqrt((b * b) - (4 * c))) && (b * b) - (4 * c) != 0)
^~~~
prog.cpp:12:8: note: suggested alternative: ‘qsort’
if (sqrt((b * b) - (4 * c)) == floor(sqrt((b * b) - (4 * c))) && (b * b) - (4 * c) != 0)
^~~~
qsort
prog.cpp:12:35: error: ‘floor’ was not declared in this scope
if (sqrt((b * b) - (4 * c)) == floor(sqrt((b * b) - (4 * c))) && (b * b) - (4 * c) != 0)
^~~~~
prog.cpp:12:35: note: suggested alternative: ‘float’
if (sqrt((b * b) - (4 * c)) == floor(sqrt((b * b) - (4 * c))) && (b * b) - (4 * c) != 0)
^~~~~
float
prog.cpp:27:8: error: ‘sqrt’ was not declared in this scope
if (sqrt((b * b) - (4 * c)) == floor(sqrt((b * b) - (4 * c))) && (b * b) - (4 * c) != 0)
^~~~
prog.cpp:27:8: note: suggested alternative: ‘qsort’
if (sqrt((b * b) - (4 * c)) == floor(sqrt((b * b) - (4 * c))) && (b * b) - (4 * c) != 0)
^~~~
qsort
prog.cpp:27:35: error: ‘floor’ was not declared in this scope
if (sqrt((b * b) - (4 * c)) == floor(sqrt((b * b) - (4 * c))) && (b * b) - (4 * c) != 0)
^~~~~
prog.cpp:27:35: note: suggested alternative: ‘float’
if (sqrt((b * b) - (4 * c)) == floor(sqrt((b * b) - (4 * c))) && (b * b) - (4 * c) != 0)
^~~~~
float
prog.cpp:82:8: error: ‘sqrt’ was not declared in this scope
if (sqrt((4 * c) - (b * b)) == floor(sqrt((4 * c) - (b * b))) && (b * b) - (4 * c) != 0)
^~~~
prog.cpp:82:8: note: suggested alternative: ‘qsort’
if (sqrt((4 * c) - (b * b)) == floor(sqrt((4 * c) - (b * b))) && (b * b) - (4 * c) != 0)
^~~~
qsort
prog.cpp:82:35: error: ‘floor’ was not declared in this scope
if (sqrt((4 * c) - (b * b)) == floor(sqrt((4 * c) - (b * b))) && (b * b) - (4 * c) != 0)
^~~~~
prog.cpp:82:35: note: suggested alternative: ‘float’
if (sqrt((4 * c) - (b * b)) == floor(sqrt((4 * c) - (b * b))) && (b * b) - (4 * c) != 0)
^~~~~
float
prog.cpp:97:8: error: ‘sqrt’ was not declared in this scope
if (sqrt((4 * c) - (b * b)) == floor(sqrt((4 * c) - (b * b))) && (b * b) - (4 * c) != 0)
^~~~
prog.cpp:97:8: note: suggested alternative: ‘qsort’
if (sqrt((4 * c) - (b * b)) == floor(sqrt((4 * c) - (b * b))) && (b * b) - (4 * c) != 0)
^~~~
qsort
prog.cpp:97:35: error: ‘floor’ was not declared in this scope
if (sqrt((4 * c) - (b * b)) == floor(sqrt((4 * c) - (b * b))) && (b * b) - (4 * c) != 0)
^~~~~
prog.cpp:97:35: note: suggested alternative: ‘float’
if (sqrt((4 * c) - (b * b)) == floor(sqrt((4 * c) - (b * b))) && (b * b) - (4 * c) != 0)
^~~~~
float
Standard output is empty