The code below needs to write “hello world” the screen eight (8) times. You can replace, remove, or add one character in the code. Can you find 2 solutions?
```
int c = 0, t = 9;
while( c < t)
{
cout << “\n hello world”;
++c;
}
```
```
This is a bit simpler than #36. Can change the t = 9 to t = 8
int c = 0, t = 8;
while( c < t)
{
cout << "\n hello world";
++c;
}
The second solution is found by changing c = 0 to c = 1;
int c = 1, t = 9;
while( c < t)
{
cout << "\n hello world";
++c;
}
```
You might also like to view...
Suppose a new set of protocols were to replace TCP and IP as standard network protocols. How difficult would it be to incorporate support for these new protocols intoWindows XP?
What will be an ideal response?
To change the design of a query, right-click the query in the Navigation Pane and then click ____ on the shortcut menu.
A. Open B. Query Window C. SQL D. Design View
Which of the following wireless standards has a MAXIMUM transfer rate of 11Mbps?
A. 802.11a B. 802.11b C. 802.11g D. 802.11n
When the user selects a date from the DatePickerDialog, the ____________________ method automatically obtains the date selected by the user.
Fill in the blank(s) with the appropriate word(s).