#include <iostream>
using namespace std;
int main() {
int counter = 0;
for (int i = 5; i <= 50; i++)
if (i % 3 == 0 and i % 8 != 0)
counter++;
cout << counter;
return 0;
}
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
#include <iostream>
using namespace std;
int main() {
int counter = 0;
for (int i = 5; i <= 50; i++)
if (i % 3 == 0 and i % 8 != 0)
counter++;
cout << counter;
return 0;
}