Question: Integers first _ item and last _ item are read from input, representing the items in an assembly line, with first _ item less than

Integers first_item and last_item are read from input, representing the items in an assembly line, with first_item less than last_item. Integer items_counted is initialized with 0. For every third item between first_item and last_item, both inclusive:
Output 'Sampling item: ' followed by the item's value.
Increment items_counted.
Click here for example
Ex: If the input is:
410
413
then the output is:
Sampling item: 410
Sampling item: 413
Total items counted: 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!