Search found 1 match

by nilaunog
Sat Apr 06, 2013 9:03 am
Forum: Volume 1 (100-199)
Topic: 136 - Ugly Numbers
Replies: 156
Views: 42042

136 Ugly number

what is the mistake of the following code?? plz help me??
#include<stdio.h>
int main()
{
long long int i=1,j,k,l;
long long int num, count=1;
while(count==1500)
{
for(i=1;i<=num;i++)
{
k=0;
if(num%i==0)
{
for(j=1;j<=i;j++)
{
if(i%j==0)
k++;

}
if(k==2)
{
l=i;
}
}
}
if((l==2)||(l ...

Go to advanced search