...cant fully understand looping,, kindly give an example please..
the one with... the program ask to enter an number repeatedly until it reach a certain point...
tnx.. super..super,,
int input = 0;
int nInput = 0;
while (nInput <= 100) {
std::cout << "enter a number: ";
std::cin >> input;
nInput += input;
}
std::cout << "your number went over 100" << std::endl;
theres also a for statement
1 2 3 4 5 6 7
int input = 0;
for (int i = 0; i <= 100; i += input) {
std::cout << "enter a number: ";
std::cin >> input;
}
std::cout << "your number went over 100" << std::endl;