+ 1

What is the problem with this program ---

#include <iostream> #include<string> using namespace std; int main() { int age; cin >>age; cout<<"you age is,""<<age; return 0; }

18th Sep 2018, 5:09 AM
Md Ibrahim (West Bengal, India)
Md Ibrahim (West Bengal, India) - avatar
6 Answers
+ 4
Remove the double quotation marks at the end.
18th Sep 2018, 5:13 AM
HoĂ ng Nguyễn Văn
HoĂ ng Nguyễn Văn - avatar
+ 2
instead I tried this. #include <iostream> using namespace std; int main() { int i; cin>>i; cout<<"your age is:"<<i; return 0; }
18th Sep 2018, 5:16 AM
Md Ibrahim (West Bengal, India)
Md Ibrahim (West Bengal, India) - avatar
+ 2
md ibrahim i see the problem is already solved (double quotes removed) You have to be careful with those small things. Keep on coding that's how you grow... encountering errors and learning how to fix them
18th Sep 2018, 5:54 AM
Michael Ngwerume
Michael Ngwerume - avatar
+ 2
Thank you Micheal Ngwerume
18th Sep 2018, 6:04 AM
Md Ibrahim (West Bengal, India)
Md Ibrahim (West Bengal, India) - avatar
+ 2
<<"
27th Nov 2018, 6:55 PM
Abdol Hashimi
Abdol Hashimi - avatar
0
syntax error. Remove the double quotes.
4th Feb 2019, 11:01 PM
Kalkidan Yared
Kalkidan Yared - avatar