Question: Rewrite the following so that it uses using declarations instead of the using directive: #include using namespace std; int main() { double x; cout <
Rewrite the following so that it uses using declarations instead of the using directive:
#include
using namespace std;
int main()
{
double x;
cout << "Enter value: ";
while (! (cin >> x) )
{
cout << "Bad input. Please enter a number: ";
cin.clear();
while (cin.get() != '\n')
continue;
}
cout << "Value = " << x << endl;
return 0;
}
Step by Step Solution
3.38 Rating (173 Votes )
There are 3 Steps involved in it
include int main double x using stdcout using stdci... View full answer
Get step-by-step solutions from verified subject matter experts
