Answer:
// Program is written in C++
// Comments are used for explanation purpose
// Program starts here
int main()
{
// DECLARE VARIABLES
string word;
int kount = 0;
// Take input
cout<<"Enter duck or goose";
cin>word;
// Checking if word is goose or not
if(word = "goose")
{
cout<<"Ducks = 0";
}
else{
// Loop starts here
while(string == "ducks")
{
kount++;
cin>>word;
}
cout<<"Ducks = "<<kount;
}
return 0;
}