Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int count=0, max=0;
- for (int i=2481; i<14832; i++) {
- if ((i%5 == 0 || i%11 ==0) && (i%6 !=0 && i%7 !=0 && i%10 !=0 && i%23 !=0)) {
- count++;
- if (i>max) max=i;
- }
- }
- cout<< count<<endl<<max;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement