Assume the int variables i and result , have been declared but not initialized . Write a for loop header — i.e. something of the form

LANGUAGE: C++

CHALLENGE:

Assume the int variables i and result , have been declared but not initialized . Write a for loop header — i.e. something of the form

for ( . . . )
for the following loop body :

result = result * i;
When the loop terminates , result should hold the product of the odd numbers between 10 and 20.

NOTE: just write the for loop header; do not write the loop body itself.

SOLUTION:

The Bad News: The content you are trying to access is only available to members.

The Good News: You too can be a member, simply Click Here.

Already a member?

Posted in ,

1 Comment

  1. J Cohenour on February 28, 2017 at 5:02 pm

    Java

    for(i = 11, result = 1; i <20 ; i+=2)

Leave a Comment

You must be logged in to post a comment.