# I can’t seem to figure out why there is no input asked when an invalid number is asked for. The code I have so far is below: int main() { cout…

I can’t seem to figure out why there is no input asked when an invalid number is asked for. The code I have so far is below:

int main()

{

cout << “Please enter your numbers: “; // Output to user

string st;  // Initialize Variable

cin >> st;// Input numbers

stringstream stream(st); // String stream

int arr; // Max array

int count = 0; // Initialize variable

int number;

while (stream >> number)  // While loop

{

arr[count] = number;  // Array

count++;     // Increment count

if (stream.peek() == ‘,’)

stream.ignore();  // Checks for comma and ignores them

}

for (int i = 0; i < count; i++) // For Loop

{

number = arr[i];   // Number into array

{

if ((number %3 == 0) && (number %5 == 0)) // Checks if the number is divisible by 3 or 5

{

cout << “Number: ” << number << ” – FizzBuzz” << endl; // Output ” – FizzBuzz” if divisible by 3 or 5

}

else if (number % 3 == 0) // Checks if the number is divisible by 3

{

cout << “Number: ” << number << ” – Fizz” << endl; // Output ” – Fizz” if divisible by 3

}

else if (number % 5 == 0) // Checks if the number is divisible by 5

{

cout << “Number: ” << number << ” – Buzz” << endl; // Output ” – Buzz” if divisible by 5

}

else

{

cout << number << ” is NOT divisible by either 3 or 5.” << endl; // Output if number not divisible by 5

cout << “Please enter another number: “; // Output asking for another number

cin >> number;  // Input for new number

break;

}

}

}

return 0;

}

## Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
\$26
The price is based on these factors:
Number of pages
Urgency
Basic features
• Free title page and bibliography
• Unlimited revisions
• Plagiarism-free guarantee
• Money-back guarantee
On-demand options
• Writer’s samples
• Part-by-part delivery
• Overnight delivery
• Copies of used sources
Paper format
• 275 words per page
• 12 pt Arial/Times New Roman
• Double line spacing
• Any citation style (APA, MLA, Chicago/Turabian, Harvard)

# Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

### Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

### Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

### Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.