
6.12 Programming Activity 2: Using for Loops 351
Enter a positive integer or 0 to exit > 100
Factors of 100: 2 4 5 10 20 25 50
Enter a positive integer or 0 to exit > 25
Factors of 25: 5
Enter a positive integer or 0 to exit > 21
Factors of 21: 3 7
Enter a positive integer or 0 to exit > 13
Factors of 13: none, 13 is prime
Enter a positive integer or 0 to exit > 0
6.12 Programming Activity 2: Using for Loops
In this activity, you will write a for loop:
For this Programming Activity, we will again calculate the total cost of the items in
a grocery cart. This time, however, we will write the program for the Express Lane.
In this lane, the customer is allo ...