0
Value b
When I just wrote only 1 number(ex: 34), output screen showed me result "34 8". I don't know number 8 why appearing on output #include <iostream> using namespace std; int main() { int a, b; cout << "Enter a number \n"; cin >> a; cout << "Enter another number \n"; cin >> b; return 0; }
5 ответов
+ 3
If you mean that you only input one number, then the variable b would be a "garbage number", which the value depends on compiler.
+ 2
Not exactly right. It might be 8 on your compiler, but 204306 on my compiler. The default is not 8 but depends on the compiler. SoloLearn playground shows the value of b is 8, but not in my compiler.
+ 1
yes yes
+ 1
Thanks a lot. I understand that CarrieForle
0
it means that value b is 8 or base on complier