Click here to Skip to main content
15,908,455 members

Comments by Meroo king (Top 6 by date)

Meroo king 20-Mar-13 23:13pm View    
so what should i do?
Meroo king 20-Mar-13 22:02pm View    
yes
Meroo king 20-Mar-13 21:56pm View    
there is no vale show up
Meroo king 20-Mar-13 21:38pm View    
i have tried it by myself but dosent work !

#include <iostream>
#include <cmath>
using namespace std;
double V_Out_Funct(double X_l=2πfl, double X_c=□(1/2πfc), double w=2πf)
{
return Z=R*(X_l+X_c )j
}

int main()
{
double X_l=2πfl, X_c=□(1/2πfc), w=2πf;
//Variable Inputs
cout << "Enter the value of X_l=2πfl: ";
cin >> X_l=2πfl;
cout << "Enter the value of X_c=□(1/2πfc): ";
cin >> X_c=□(1/2πfc);
cout << "Enter the value of w=2πf: ";
cin >> w=2πf;
cout << "Enter the value of F: ";
cin >> F;
// calculate the Z
double Z=R*(X_l+X_c )j;
Z = Z_Funct(X_l=2πfl, X_c=□(1/2πfc), w=2πf);
cout << "Z:" << Z;

return 0;
}
Meroo king 20-Mar-13 21:18pm View    
Deleted
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
// Variable Declerations
double a, b, c;
//Variable Inputs
cout << "Enter the value of a: ";
cin >> a;
cout << "Enter the value of b: ";
cin >> b;
cout << "Enter the value of c: ";
cin >> c;
//Computations
double discriminant = (pow(b,2) - 4*a*c);
double positive_root = (((-b) + sqrt(discriminant))/(2*a));
double negative_root = (((-b) - sqrt(discriminant))/(2*a));
//Output
if (discriminant == 0)
{
cout << "\n\nThe discriminant is ";
cout << discriminant << endl;
cout << "The equation has a single root.\n\n";
}
else if (discriminant < 0)
{
cout << "\n\nThe discriminant is ";
cout << discriminant << endl;
cout << "The equation has two complex roots.\n\n";
}
else
{
cout << "\n\nThe discriminant is ";
cout << discriminant << endl;
cout << "The equation has two real roots.\n\n";
}
//Final Root Values
cout << "The roots of the quadratic equation are x = ";
cout << negative_root;
cout << ", ";
cout << positive_root << endl << endl;
return 0;
}
i have wrote this with different formule but cant do something applying to my subject which is electronic