0
So i wanted to make a calculator so i did int << a = 5; int << b = 10; int sum a + b = 15; but it didnt work
help n what did I did wrong
1 Réponse
+ 5
How you should write it should be something like
int a = 5;
int b = 10;
int sum = a + b;
If you then output the sum you will see that it is 15. Keep in mind that in C++ the '=' is an assignment operator and assigns everything on the righ thand side to a variable on the left hand side, if it is acceptable by the compiler.