Write a program to find the smallest value of n for which 1 + 2 + 3 + ... + n is greater than or equal to 100.
What will be an ideal response?
```
#include
using namespace std;
int main ()
{
int n, sum;
n = 0;
sum = 0;
while (sum < 100)
{
n++;
sum += n;
}
cout << "You must add at least " << n
<< " sequential integers to get a sum of 100.";
return 0;
}
```
You might also like to view...
Write a function that uses the same process to draw a vertical line down the middle of the picture, and a horizontal line across the middle of the picture, neatly separating the picture into four quadrants. This function can work for any square or rectangular picture.
What will be an ideal response?
To select a placeholder for deletion, click its ____________________ to change it to a solid line.
Fill in the blank(s) with the appropriate word(s).
What is the difference between conjunctive and disjunctive normal form?
What will be an ideal response?
Before you can use an array, you first must declare it.
Answer the following statement true (T) or false (F)