I am creating a simple program using a couple methods that will ask the user to input data (type int) until an empty string is entered, after which the output will be displayed.
I need to figure out how to make the input stop when an empty string is entered and have the output displayed after that.
I am using a while loop, which needs to read:
There also needs to be an if statement inside of the while loop that reads:
Any help would be appreciated, thanks!
I need to figure out how to make the input stop when an empty string is entered and have the output displayed after that.
I am using a while loop, which needs to read:
Code:
int number;
while (number is not equal to an empty string)
{
statement;
}
Code:
if (number is not equal to an empty string)
{
statement;
}
else
break;
Comment