Answer:
Following are the program to this question:
#include<iostream> //defining header file
using namespace std;
int main() //defining main method
{
int sum = 0, num; //defining integer variable
cout << "Enter a number :"; // print message
cin >> num; //input number
sum=sum+num;
while (sum < 200) //defining loop that check sum value is less then 200
{
cin >> num; //input number by user
sum =sum+num; //add values
}
cout << "Sum = " << sum <<" the loop stops"; //print values
return 0;
}
output:
Enter a number :44
66
90
Sum = 200 the loop stops
Explanation:
In the given C++ program, the main method is declared, inside the method two integer variable "sum and num" is declared, in which sum variable assign a value, that is 0, and num is used to take input from the user end.