cin, arith. expressions

Can anybody help me with this problem?:

Write 2 C++ statements for reading input and the quadratic equation (both roots), filling the blanks below, after the following variables declarations and C++ statements: (in case you forgot the quadratic equation, see below the code) IF TIME, put these statements in a C++ program (with #includes, main, etc.) and RUN IT. Upload these completed statements (or main).

double a, b, c;

double root1, root2;

cout << "Enter 3 coefficients of a quadratic equation: ";

// PUT C++ STATEMENTS HERE TO READ INTO a, b, and c


root1 = _______________;

root2 = _______________;

cout << "Root 1 = " << root1 << endl;

cout << "Root 2 = " << root2 << endl;
Are you serious about not having a faintest clue on how to use std::cin?

http://www.cplusplus.com/doc/tutorial/basic_io/
Topic archived. No new replies allowed.