This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
The Program is supposed to repeatedly prompt the user for the three coefficients values,a,b and c, and will then evaluate the expression below and display the two possible values for x(I used X and Y as my two values). And when a=999 it will terminate the program without asking for b or c. These are the errors I get when I try to compile. Am I even on the right track or am I way off?
Any help would be appreciated
Error E2277 program1.cpp 18: Lvalue required in function main()
Error E2451 program1.cpp 26: Undefined symbol 'Return' in function main()
Error E2379 program1.cpp 26: Statement missing ; in function main()
Error E2134 program1.cpp 27: Compound statement missing } in function main()
*** 4 errors in Compile ***
include<iostream.h>
include<math.h>
int main()
{
int X;
int Y;
int a;
int b;
int c;
cin>>a;
while(a!=999)
{
cin>>b;
cin>>c;
}
if (650-7cc<=-1)
cout<<"Negative under the radical"<<endl;
else if (a-4*c=0)
cout<<"Divided by zero"<<endl;
else
{
X=(-3b)-sqrt(650-7cc)/(a-4c);
Y=(-3b)-sqrt(650-7cc)/(a-4c);
cout<<X<<endl;
cout<<Y<<endl;
Return 0;
}
Subreddit
Post Details
- Posted
- 7 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/cpp_questio...