Search found 2 matches
- Tue Mar 20, 2007 3:35 pm
- Forum: Volume 4 (400-499)
- Topic: 412 - Pi
- Replies: 104
- Views: 30272
- Sat Mar 17, 2007 8:49 am
- Forum: Volume 4 (400-499)
- Topic: 412 - Pi
- Replies: 104
- Views: 30272
WA 412
im getting the correct output for all the test cases given in the question..but still im getting a WA..pls help me with my code..
#include<iostream.h>
#include<stdlib.h>
#include<math.h>
int cf(int a,int b)
{
while(a!=0&&b!=0)
{
if(a>b)
a=a%b;
else
b=b%a;
if(a==1||b==1)
return 0;
}
return ...
#include<iostream.h>
#include<stdlib.h>
#include<math.h>
int cf(int a,int b)
{
while(a!=0&&b!=0)
{
if(a>b)
a=a%b;
else
b=b%a;
if(a==1||b==1)
return 0;
}
return ...