In: Computer Science
write a c++ program
Find an algorithm and show the codes for evaluating the number of numbers between 200 and 1000 that are divisible by 2 and 7
code:
#include <iostream>
using namespace std;
int main()
{ cout<<"Values between 200 and 1000 which is divide by 2 and
7 are as below:"<<endl;/*here we print statement*/
for(int i=201;i<1000;i++)/*here we use for loop for check every
value between 200 and 1000*/
{
if(i%2==0 && i%7==0) /*here we check condition that value
is divible by 2 and 7 or not if yes than we print value*/
{
cout<<i<<" ";
}
}
return 0;
}