0
Z = ( a - b ) ( a - c )٢
How can I write prog calculate this equation
5 Answers
+ 19
#include <iostream>
#include <math.h>
using namespace std;
int main() {
int a;
int b;
int c;
cin>>a>>b>>c;
double Z = sqrt((a-b)*(a-c));
cout<<Z;
return 0;
}
//homework done! ^_^
+ 10
Is that a ² (square) symbol? Cuz if it is, just replace @Val's equation with :
double Z = (a-b)*(pow((a-c), 2));
+ 2
thanks a lot :)
+ 2
but I think it hav some thing wrong coz we have ( a - c )2 ? I meant squrt !
+ 2
thanks again ^_^