Do while loop with double value type : Do While « Language « C++






Do while loop with double value type

Do while loop with double value type
#include <iostream>
using namespace std;

int main()
{
  double feet;

  do {
     cout << "Enter feet (0 to quit): ";
     cin >> feet;
     
     cout << feet * 12 << " inches\n";
  } while (feet != 0.0);

  return 0;
}



           
       








Related examples in the same category

1.Do while loop with a input manipulatorDo while loop with a input manipulator
2.Do while statementDo while statement