WAP to input 4 integers a, b, c, d and check that the equation a3 + b3 +c3 = d3 is satisfied or not.
#include <stdio.h>
int cube (long long n);
int main ()
{
long long a,b,c,d;
printf("Enter the value of a,b,c,d:\n");
scanf("%lld %lld %lld %lld",&a,&b,&c,&d);
if((a*a*a)+(b*b*b)+(c*c*c)==(d*d*d))
printf("YES\n");
else
printf("NO\n");
return 0;
}
No comments:
Post a Comment