#include<iostream.h>
#include<conio.h>
#include<math.h>
int EQ(int a, int b, int c, int d);
void main()
{
clrscr();
int n1, n2, n3, n4, r;
cout<<"Enter four integers: ";
cin>.n1>>n2>>n3>>n4;
r = EQ(n1,n2,n3,n4);
if(r == 0)
cout<<"The values of a, b, c and d satisfies the equation";
if(r== -1)
cout<<"The values a, b, c and d does not satisfied the equation";
getch();
}
int EQ(int a, int b, int c, int d)
{
if(pow(a,3)+pow(b,3)+pow(c,3) == pow(d,3))
return 0;
else
return -1;
}
#include<conio.h>
#include<math.h>
int EQ(int a, int b, int c, int d);
void main()
{
clrscr();
int n1, n2, n3, n4, r;
cout<<"Enter four integers: ";
cin>.n1>>n2>>n3>>n4;
r = EQ(n1,n2,n3,n4);
if(r == 0)
cout<<"The values of a, b, c and d satisfies the equation";
if(r== -1)
cout<<"The values a, b, c and d does not satisfied the equation";
getch();
}
int EQ(int a, int b, int c, int d)
{
if(pow(a,3)+pow(b,3)+pow(c,3) == pow(d,3))
return 0;
else
return -1;
}
0 comments:
Post a Comment