Search found 1 match

by niloy
Thu Mar 27, 2008 7:40 pm
Forum: Volume 4 (400-499)
Topic: 412 - Pi
Replies: 104
Views: 30374

Why Wrong ANS......

#include<stdio.h>
#include<math.h>

int is_CommonFact(int a,int b)
{ int temp;
if(a==1||b==1)
return 0;
else
{
if(b>a)
{
temp=b;
b=a;
a=temp;
}
while(b)
{
temp=a%b;
a=b;
b=temp;
}
if(a==1)
return 1;
else
return 0;
}
}

int main(void)
{

int n,count;
int i,j,a[55];

while ...

Go to advanced search