The following program segment is supposed to print the first n integers, but it doesn't work. Correct the statements so that they achieve the intended purpose.
```
i = 0;
while (i < n)
cout << x << endl;
i++;
```
```
i = 0;
while (i < n)
{
cout << i << endl;
i++;
}
```
Computer Science & Information Technology
You might also like to view...
Layout view only allows you to format a form or report
Indicate whether the statement is true or false
Computer Science & Information Technology
The origins of Ruby go back to 1995 where it quickly gained notice and popularity in Japan.
Answer the following statement true (T) or false (F)
Computer Science & Information Technology