Tuesday 30 May 2017
Monday 29 May 2017
Friday 26 May 2017
Wednesday 24 May 2017
opp in c++ ch# 9 Write a program which have a function Eq() and passing parameter a,b,c,d and show the the a3+b3+c3=d3 equation is satisfied or not. If condition satisfied then return 0 otherwise return -1. opp in c++
#include<iostream.h>
#include<conio.h>
int eq(int
a,int b,int c,int d);
void main()
{
clrscr();
int w,x,y,z,r;
cout<<"Enter four Number";
cin>>w>>x>>y>>z;
r=eq(w,x,y,z);
if(r==0)
cout<<"Equation is satisfied
";
else
cout<<"not satisfied";
getch();
}
int eq(int
a,int b,int c,int d)
{
int
a1,b1,c1,d1;
a1=a*a*a;
b1=b*b*b;
c1=c*c*c;
d1=d*d*d;
if((a1+b1+c1)==d1)
return 0;
else
return -1;
}
Enter
four Number1
1
1
1
not satsified
Tuesday 23 May 2017
Monday 22 May 2017
Sunday 21 May 2017
Thursday 18 May 2017
Tuesday 16 May 2017
Monday 15 May 2017
Sunday 14 May 2017
Saturday 13 May 2017
Friday 12 May 2017
Saturday 6 May 2017
Friday 5 May 2017
Monday 1 May 2017
Subscribe to:
Posts (Atom)