It looks like you're new here. If you want to get involved, click one of these buttons!
// ask for a person's name, and greet the person
#include <iostream>
#include <string>
int main()
{
// ask for the person's name
std::cout << \"Please enter your first name: \";
// read the name
std::string name; // define `name'
std::cin >> name; // read into `name'
// write a greeting
std::cout << \"Hello, \" << name << \"!\" << std::endl;
return 0;
}
// ask for a person's name, and greet the person
/*
ask for a person's name, and greet the person
blah
blah
*/
// ask for a person's name, and greet the person
#include <iostream>
#include <string>
using namespace std;
~snip~
~snip~
int main()
{
using std::cout;
using std::cin;
using std::string;
using std::endl;
// ask for the person's name
cout << \"Please enter your first name: \";
// read the name
string name; // define `name'
cin >> name; // read into `name'
// write a greeting
cout << \"Hello, \" << name << \"!\" << endl;
return 0;
}
int main()
{
~snip~
}
std::cout << \"Please enter your first name: \";
std::string name;
std::cin >> name;
std::cout << \"Hello, \" << name << \"!\" << std::endl;
return 0;
apt-get install code-blocks