Trying to condition a double type with a char type. But there seems to be no output.
Here's an example:
double x;
cin >> x;
if(x == 'a') cout << "ye";
edit1: sorry for not being specific
Main Goal:
1.) I'm currently trying to build a calculator in which, that if you input a char into a variable(which is supposed to be a double or int maybe), the expected output will be printed, even under the condition of data type errors.
2.) This calculator is like an algebra calculator(but it isn't what you would expect from the foundations of deriving formulas), I'm not a yet experienced when it comes to these kinds of complex inputs, outputs, and algorithms.
3.) From the point of number 1, I do not know what solutions can I get when conditioning data types.
Aucun commentaire:
Enregistrer un commentaire