double area; cin >> area;
if (cin.fail())
if (area < 0)
if (cin) /* the stream did not fail */ else /* the stream failed */