tried doing the calculator first before watching the vid #include using namespace std; int main() { double a; double b; char operation; cout > a; cout > b; cout > operation; switch (operation) { case '+': cout
Did this before watching the video: #include #include int main() { char selectedOperator; double a; double b; double result; std::cout a; std::cout selectedOperator; std::cout b; switch (selectedOperator) { case '+': result = a + b; break; case '-': result = a - b; break; case '*': result = a * b; break; case '/': result = a / b; break; default: break; } std::cout
that's awesome bro. Now I will tel you 1 thing. when num1 is divided by num2, and num1 is equal to 4 and num2 is equal to 0. in the end answer will be infinity right ?
# include
int main() {
char op;
double num1;
double num2;
double result;
std::cout op;
std::cout > num1;
std::cout > num2;
switch(op){
case '+':
result = num1 + num2;
std::cout
Thanks
Hey Bro! Why this video appears to be unlisted? Any issue with the content or a mistake?
Really Love your tutorials! Amazing!
thank you
How to copy??????????????????????????????????????????????
@@yourfriendleyduck1 you cant be serious
tried doing the calculator first before watching the vid
#include
using namespace std;
int main() {
double a;
double b;
char operation;
cout > a;
cout > b;
cout > operation;
switch (operation) {
case '+':
cout
thanks for teaching me C++ you're a king
والله بەتەڵ بژی 🎉
Random comment:: I've been finding bro code is the best way to learn new programming languages. Thanks for the awesome vids!
Did this before watching the video:
#include
#include
int main() {
char selectedOperator;
double a;
double b;
double result;
std::cout a;
std::cout selectedOperator;
std::cout b;
switch (selectedOperator)
{
case '+':
result = a + b;
break;
case '-':
result = a - b;
break;
case '*':
result = a * b;
break;
case '/':
result = a / b;
break;
default:
break;
}
std::cout
that's awesome bro. Now I will tel you 1 thing. when num1 is divided by num2, and num1 is equal to 4 and num2 is equal to 0. in the end answer will be infinity right ?
My clumsy way of solving it:
case '*':
result = num1 * num2;
if (num1 == 0){
result = 0;
}
if (num2 == 0){
result = 0;
}
std::cout
#include
int main() {
double x;
double y;
int choice;
std::cout > x;
std::cout > y;
std::cout
ain't no way if statements works in switch
and WAT DA JAWN DAT IS VEERY CONFUSING
@myownaccountnoazzedine they work, and I agree it's indeed confusing I was just messing
Nice Video.
i used if for fast and also did great and your is the fastest
thank you
why 'op' was a char not a string?
because its one caracter
and because switches dont work with stings
Because char is best for 1 character, but it's also correct (Yes i know i'm late)
❤
std::cout
I'm moroccan but WAT DA JAWN
spaghetti
Random comment
abi ezik misin switchin dışına yazsana