Wednesday, 19 June 2013

beal conjuncture problem

beal conjecture







#include<stdio.h>
#include<math.h>
float main()
{
 float a,b,c,d,e,f,g,i,j,k,x,y,z,l,m,n,o,p;
 printf("enter the numbers a,b,c,i,j,k,p,o:\n");
 scanf("%f %f %f %f %f %f %f %f",&a,&b,&c,&i,&j,&k,&p,&o);
 e=i;
 f=j;
 jump1: l=a;
       m=b;
       n=c;
       while(a!=b)
       if(a>b)
       a-=b;
       else
       b-=a;
       if(a!=1)
       {
       a=l;
       b=m;
       goto last1;
       }
       else
       a=l;
       b=m;
       while(b!=c)
       if(b>c)
       b-=c;
       else
       c-=b;
       if(b!=1)
       {
       b=m;
       c=n;
       goto last2;
       }
       else
       b=m;
       c=n;
       while(c!=a)
       if(c>a)
       c-=a;
       else
       a-=c;
       if(c!=1)
       {
       a=l;
       c=n;
       goto last3;
       }
       else
       a=l;
       c=n;
 jump: x=pow(a,i);
       y=pow(b,j);
       z=pow(c,k);
       d=x+y;
 if(d==z)
 {
  printf("%f %f %f %f %f %f are the numbers:",a,b,c,i,j,k);
  return 0;
 }
 else
 i+=1;
 if(i<p)
 goto jump;
 else
 i=e;
 j+=1;
 if(j<p)
 goto jump;
 else
 i=e;
 j=f;
 k+=1;
 if(k<p)
 goto jump;
 else
 last1:
       b+=1;
       if(b<o)
       goto jump1;
       else
 last2:
       c+=1;
       if(c<o)
       goto jump1;
       else
 last3:
       a+=1;
       if(a<o)
       goto jump1;
       else
       printf("no solution\n");
       return 0;
}