//Test 2 Question #23
#include<iostream>
using namespace std;
int main()
{
//variables defined here
float y, a, b, w, x, q, h, g;
char exit_variable;
int option;
cout<<"Please chose a program:\n";
cout<<"\n1. Y=10+((5*a)/((3*b)-(4*b*b)\n";
cout<<"\n2. w=(6*x*x*x*x*x)-15\n";
cout<<"\n3. q=(3/4)(h-(7*g)/6)\n";
cin>>option;
switch (option)
{case (1):
cout<<"\nEnter value for a ";
cin>>a;
cout<<"Enter value for b ";
cin>>b;
y=10+(5*a/(3*b))-(4*b*b);
cout<<"The answer is "<<y;
cout<<"When substituing into the equation Y=10+((5*";cout<<a;
cout<<")/((3*";cout<<b;
cout<<")-(4*";
cin>>b;
cout<<"*";
cin>>b;
cout<<")";
break;
case (2):
cout<<"Enter value for x";
cin>>x;
w=(6*x*x*x*x*x)-15;
cout<<"The answer is ";cin>>w;
cout<<"/nWhen substituting into the equation w=(6*";
cin>>x;
cout<<"*";cin>>x;
cout<<"*";
cin>>x;
cout<<"*";
cin>>x;
cout<<")-15";
break;
case (3):
cout<<"Enter value for h";
cin>>h;
q=(3/4)*(h-(7*g)/6);
cout<<"The answer is";cin>>q;
cout<<"When substituting into the equation q=(3/4)(";
cin>>h;cout<<"-(7*";
cin>>g;
cout<<")/6)";
break;
}
[/code] cin>>exit_variable;
}
what needs fixing ? :)
I got a bit further this time. I don't know what you mean by /code.
I need the program to calculate the 3 equations and output the answer and output what was inputed.
for example, it should say answer = #
and then input for a value was # and input for B value was #