#include <iostream>
using namespace std;
int main()
{ int i,num1,num2,sum=0,count=0;
cout<<"Enter a range: ";
cin>> num1>> num2;
for(i = num1;i <= num2; i++)
if(i%3 ==0 ||i%5 ==0)
{
count++;
//sum=sum+i;
cout<<i<<" ";
}
return 0;
}
I did a program of finding the divisors of 3 and 5 in a given range, but now i want to find the odd numbers from that divisors.how to do that??? suppose for this program i enter the range 1 to 20.And i will get divisors:3,5,6,10,12,15,18,20.Now i want to get odd numbers from this numbers.How to do that??