Westonci.ca is your go-to source for answers, with a community ready to provide accurate and timely information. Discover a wealth of knowledge from experts across different disciplines on our comprehensive Q&A platform. Discover detailed answers to your questions from a wide network of experts on our comprehensive Q&A platform.
Sagot :
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.

Thank you for choosing our service. We're dedicated to providing the best answers for all your questions. Visit us again. We hope you found what you were looking for. Feel free to revisit us for more answers and updated information. Westonci.ca is here to provide the answers you seek. Return often for more expert solutions.