The intention of the following program fragment is to display the positive integers from 1 through n, but it doesn't work. Correct the while statement so the fragment achieves the desired effect.
```
i = 1;
while (i <= n)
printf("%d ", n);
i = i + 1;
printf("\n");
```
```
while (i <= n) {
printf("%d ", i);
i = i + 1;
}
```
Computer Science & Information Technology
You might also like to view...
The default font in Word is ________ and the font size is 11
A) Cambria B) Batang C) Calibri (Body) D) Arial Black
Computer Science & Information Technology
The ________ font effect makes all characters in a word uppercase but the first character slightly larger
Fill in the blank(s) with correct word
Computer Science & Information Technology