Rewrite the code segment below using a while loop to produce a code segment that is exactly equivalent.
```
product = 1.0;
for (next=1; next <= m; next++)
product *= next;
```
```
product = 1.0;
next = 1;
while (next <= m)
{
product *= next;
next++;
}
```
You might also like to view...
Consider the version of the FireAlarm program written in JMS (Section 6.4.3). How would you extend the consumer to receive alarms only from a given location?
What will be an ideal response?
Which of the following options should be selected under the FILE tab to access the Create a Video button?
A. Import B. Save as Video C. Export D. Video
Must throwing an exception cause program termination?
What will be an ideal response?
In comparing the OSI model to the TCP/IP model, which of the following layers of the OSI model are equivalent to the Application layer in the TCP/IP model?
A) Application B) Presentation C) Session D) Transport E) Network F) Data link G) Physical