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
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 ?
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
# 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??????????????????????????????????????????????
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
والله بەتەڵ بژی 🎉
#include
int main() {
double x;
double y;
int choice;
std::cout > x;
std::cout > y;
std::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!
i used if for fast and also did great and your is the fastest
thank you
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
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
why 'op' was a char not a string?
because its one caracter
and because switches dont work with stings
Nice Video.
❤
Can you imagine if user just type: "4-2" and your program find a char operator in string and calculate result..
std::cout
spaghetti
Random comment
abi ezik misin switchin dışına yazsana