Question

Convert the following while loop into a for loop. int 1 - 50: int sum-07 while (sum < 1000) sum - sum + 1; Question 35 (2 poi
0 0
Add a comment Improve this question Transcribed image text
Answer #1

34)

        int i=50;

        for( int sum = 0 ; sum < 1000 ; sum = sum + i ){

            i--;

        }

35)

since the language was neither given and nor I was able to figure it out, I don't know what statement is used to print strings. replace the boldened statement to the line of code that prints a "$" in the same line.

        k=0;

        while ( k < 80 ) {

            PRINT( "$" );

            k++;

        }

--------------------------------------

# If you have a query/issue with respect to the answer, please drop a comment. I will surely try to address your query ASAP and resolve the issue

Add a comment
Know the answer?
Add Answer to:
Convert the following while loop into a for loop. int 1 - 50: int sum-07 while...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT