kbinput.cpp
// Example of keyboard input using cin // (NDE, 2013-12-29) #include <iostream> using namespace std; int main() { double x, y; cout << "Enter x and y coordinates: "; cin >> x >> y; cout << "Coordinates are (" << x << "," << y << ")" << endl; cout << "Return value of cin.fail() is " << cin.fail() << endl; return 0; }