calling a value from another method
if i have
1 2 3 4
|
void first_root()
{
Root1=(-b+sqrt(d))/(2*a);
}
|
and i want to get the value for root one and print it in another void how is this possible?
would it be
1 2 3 4
|
void root1solution()
{
cout << "Root 1:"<< first_root()<< endl;
}
|
Topic archived. No new replies allowed.