Write a do-while loop that repeatedly scans integer values until a positive even number is input. You may assume the input data is a list of integers separated by blanks, and that there is a positive even number in the list.

What will be an ideal response?


```
do
scanf("%d", &num);
while (num <= 0 || num % 2 != 0);
```

Computer Science & Information Technology

You might also like to view...

Which of the following is not included in an exception’s stack trace?a. A descriptive message for the exception. b. The method-call stack at the time the exception occurred. c. The name of the exception. d. Instructions on handling the exception.

a. A descriptive message for the exception. b. The method-call stack at the time the exception occurred. c. The name of the exception. d. Instructions on handling the exception.

Computer Science & Information Technology

Which of the following is not an element observed in STROBE?

A) office location B) desk placement C) office lighting D) desk chair fabric

Computer Science & Information Technology

A(n) ________ Art graphic is a visual representation of information of which Word provides several different layouts

Fill in the blank(s) with correct word

Computer Science & Information Technology

To ensure that a link opens in the current window, use the ________ value

A) _self B) _same C) _window D) _current

Computer Science & Information Technology