|
-
June 26th, 2011, 05:50 PM
#1
infinate loop
stuck in an infinite loop don't know what im doing wrong.
#include <iostream> // have to have for output
#include <string>
#include <iomanip>
#include <limits>
#include <sstream>
using namespace std;
int main() // the main function
{
float length; // stores lengthint=0
float width;// stores width
float depth; //stores depth
float gallon; //stores the answer in gallons
cout<< "welcome to the Fish Tank calculator"" " <<'\n';//welcome text
do
{
cout << "enter the length of your fish tank in inches, numbers only" <<'\n';
cin >> length;
}
while (!isdigit(length));
cout << "Not a number " << endl;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|