I'm new to C++ and wanted to write some code which adds all natural numbers from 0 to the number given by the user except those, that are divisible by one of the numbers in an array. Here is my code:
Right now it's just checking if it's divisible by 3, but can I make it do the modulo operation with all elements of the array without having to loop through it?