Write C++ program to find z value and check the
result even or odd from this equation?
Z=(e^(a*4)/(lnb+a^2)
Answers
Answered by
1
Answer:
#include <stdio.h>
#include<math.h>
#define ln(x) log(x)
int main()
{
int a=2,b=3,c;
double z=0,e,l;
//scanf("%d",&a);
//scanf("%d",&b);
e=exp(a*4);
l=ln(b);
z=(e/(l+(a^2)));
c=z;
if(c%2==0)
{
printf("even");
}
else
{
printf("odd");
}
return 0;
}
Explanation:
Similar questions