Question: Write a program that prints all numbers from 0 to 1 0 0 0 ( both inclusive ) with the following stipulations: The numbers should

Write a program that prints all numbers from 0 to 1000(both inclusive) with the following stipulations:
The numbers should be printed in increments of 20
All numbers that are divisible by 30 or 50 should not be printed
Additionally, the total count of the printed numbers should be displayed at the end
The average value of all the printed numbers should also be displayed at the end
Your output should look like so:
204080140160220260280320340380440460520560580620640680740760820860880920940980
the total count is: 27
the average is: 505.18

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 Programming Questions!