This is a program to find the least common multiple of numbers 1 to 20. I dont know why it doesnt work. Somebody please help me out
#include<iostream>
#include<conio.h>
#define A 100
using namespace std;
int i;
bool IsItDiv(int);
int main()
{ int num=21;bool tf;
tf=IsItDiv(num);cout<<"The number thats divisible
is";
if(tf)
cout<<"The number thats divisible is"<<num;
else
{num++;IsItDiv(num);}
getch();
}
bool IsItDiv(int n)
{
for(i=1;i<=20;i++)
{
if((n%i)==0)
{
if(i==20)
{return true;}
else
{continue;}
}
else
{
return false;
}
}
}