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
Source by www.cplusplus.com #
 
PREVIOUS NEXT
Tagged: #input
ADD COMMENT
Topic
Name
9+4 =