5:5,10,15,20,25,30,35,40,45,50.
7:7,14,21,28,35,42,49.
int sum = 0;
for(int i = 1; i<51; ++i) {
if(sum%5==0||sum%7==0) {
sum+=i;
}
cout << sum;
5:5,10,15,20,25,30,35,40,45,50.
7:7,14,21,28,35,42,49.
int sum = 0;
for(int i = 1; i<51; ++i) {
if(sum%5==0||sum%7==0) {
sum+=i;
}
}
cout << sum;