Answer:
Following are the code to this question:
#include <iostream>//header file
#include <string>//header file
using namespace std;
int main() //main method
{
string item;//defining a string variable
int n;//defining integer variable
while(cin >>n >>item)//defining while loop to input value
{
if(item == "quito" && n == 0)//use if block to check input value
{
break;//use break keyword
}
cout << "Eating " << n << " " << item << " a day keeps the doctor away." << endl;//print input value with the message
}
return 0;
}
Output:
Please find the attached file.
Explanation:
In this code, inside the main method one string variable and one integer variable "item, n" is defined, that uses the while loop for input the value and uses the if block that checks string value is equal to "quito" and n value is equal to "0" it breaks the loop, and print the value with the message.