First c++ program and I already said hello

Im trying to create a program that calculates the number of integers in a given range that are not divisible by three primes and then gives me their total (i.e the total number of integers) e.g calculate the number of integers between 8 and 450 that are neither divisible by 3, 5 or 7. NOTE: the five numbers should not be fixed in the program but should be variables that the user can key in cin>>. Any ideas how to go about it?
These things are so simple, that you should know them yourself:
1) reading a variable from the keyboard
2) using a for() loop
3) using if()

Please come back after you try it yourself.
now i feel stupid
Topic archived. No new replies allowed.