+ 1
Please tell me the mistake I Am Doing In This Code .
6 Answers
+ 6
#include <iostream>
using namespace std;
int main() {
int a,b;
cin >> a >> b;
cout << a << b;
return 0;
}
Your mistake is:
cout << "a" << "b";
there should be no quotation marks
+ 2
#include <iostream>
using namespace std;
int main() {
int a,b;
cin >> a >> b;
cout << a << b;
return 0;
}
You just need to remove the " " from around a and b, When it was "a" it was printing the string a rather than the variable a.
+ 1
thank you jason
+ 1
@Rahul Sonia No worries :)
+ 1
thank u all
0
see carefully in code that you are typing extra spaces or not!
like int a, b;
or cout<< or cout <<