Prg 420 Week 3 Supporting Activity 1 loops

in Computers by vomms
Favorite Add it to your favorites and revisit later
  • Prg 420 Week 3 Supporting Activity 1 loops
Instant Download
Previewing 1 of 2 total pages.
Trouble downloading?
Copyright complaint
Instant download
Money-back guarantee
Regular Price: $9.99
Your Price: $6.99 (30% discount)
You Save: $3.00

Description

Prg 420 Week 3 Supporting Activity 1

There are 3 kinds of loops-forloop, whileloop, and dowhile loop. Under which circumstances would each kind of loop be more appropriate? Explain your answers using specific examples.

For loop- The for loop is best used when the number of iterations is known. The for loop is best used to repeat the loop a fixed number of times. The Boolean-expression is tested at the beginning of the loop. The for loop has the form: for (initialization; Boolean-expression; increment) {nested statements }.

A for loop can be used to show every number divisible by 3 between 1 and 60.

For (int num0; num , 60; num) {

If (num % 3 0) {

( "#: " dex);

}

}

While loop- While loops are best used when the exiting condition has nothing to do with the...

Comments (0)

You must sign in to make a comment.
vomms
@dgoodz
220708
4060
Rating:
Published On:
08/06/2014
Print Length:
2 page(s)
Word Count:
253
File Name:
prg-420-week-3-supporting-activity-1-loops-77.docx
File Size:
19.42 KB (0.02 MB)
Sold By:
vomms
Purchased:
0 times
Best Seller Ranking:
#42142

Other items from vomms

Customers also bought

Customers also viewed