Is one of the answers thumbnail? If so, select it.
Answer:
The answer to this question is given below in the explanation section.
Explanation:
The code is written in C++
/******************************************************************************
Online C++ Compiler.
Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.
*******************************************************************************/
#include <iostream>
#include <string>
using namespace std;
void display()
{
string yourName;
string watchedMovie;
cout<<"What is your name? ";
cin>>yourName;
cout<<"Which movie have you seen? ";
cin>>watchedMovie;
cout<<"Today, I have learned that " <<name<<" watched "<<watchedMovie<<" movie";
}
int main()
{
display();
return 0;
}
Answer:
4 5 6
Explanation:
Since there is a do-while loop, you need to check the values for each iteration until the condition (Count <= X) is not satisfied.
First iteration -> Count = 1 and X = 3, Y = 1 + 3, Write Y -> 4
Second iteration -> Count = 2 and X = 3, Y = 2 + 3, Write Y -> 5
Third iteration -> Count = 3 and X = 3, Y = 3 + 3, Write Y -> 6
After the third iteration count is equal to 4 and X is equal to 3. That is why loop ends.