-
Notifications
You must be signed in to change notification settings - Fork 0
Multiply Divide #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
osmanyasar05
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this wont compile. please fix the issues.
simpleCalculator.cpp
Outdated
| // result = YOUR_FUNCTION(a,b); | ||
| // } | ||
| // elif(oper == YOUR_OTHER_OPERATION)......... | ||
| if (oper == multiply) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oper == multiply ?
multiply is not a variable. change it with oper == "*" and oper == "/"
simpleCalculator.cpp
Outdated
| std::cout << a << " " << oper << " " << b << " = " << result; | ||
| } | ||
|
|
||
| double multiply(double a, double b) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
functions should be defined before they are used. move these up.
osmanyasar05
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Multiplication and division functons are added