Write a program to count number between 1 to 100, which are not divisible by 2,3 and 7 in c++
Answers
Answered by
2
Answer:
Explanation:
#include <iostream>
using namespace std;
int main()
{
int count=0;
for(int i=1;i<=100;i++)
{
if(i%2!=0&&i%3!=0&&i%7!=0)
count++;
}
cout<<count;
return 0;
}
Similar questions