Problem Link: A. Say Hello With C++
| Time Limit | Memory Limit |
|---|---|
| 1 second | 256 megabytes |
Problem Statement
Given a name S. Print “Hello, (name)” without parentheses.
Input
Only one line containing a string S.
Output
Print “Hello, ” without quotes, then print name.
Examples
Example
Input:
programmer
Output:
Hello, programmer
Approach
Read the string and print with the prefix.
Solution
#include <iostream>
using namespace std;
int main() {
string S; cin >> S;
cout << "Hello, " << S;
}