Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

input in c++

int main(){
  std::string firstname; //variable created as a string
  std::cout << "What's your first name
";
  std::cin >> firstname;//asking for the users' first name
  std:: cout << "Hello " << firstname
 
PREVIOUS NEXT
Tagged: #input
ADD COMMENT
Topic
Name
5+2 =