Accepting user input user input and stores it in the variable a | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

Accepting user input user input and stores it in the variable a

#include<iostream> using namespce std; int main() { int a; cout<<"Please enter a number"<<endl; cin>>a; cout<<a; return 0; } working ???

16th Dec 2017, 4:22 PM
rajmit kevadiya
rajmit kevadiya - avatar
2 ответов
+ 6
#include<iostream> using namespace std; int main() { int a; cout<<"Please enter a number"<<endl; cin>>a; cout<<a; return 0; } yes it is working and give user input as output you missed 'a' key word in namespace
16th Dec 2017, 4:47 PM
GAWEN STEASY
GAWEN STEASY - avatar
0
You can try your code in the coding section and run but not save it. Good Luck!
16th Dec 2017, 7:35 PM
H Chiang