Write a program to display the output as "Hello World" and "Hello Name" where Name is the input from the user.
#include<iostream>
using namespace std;
int main(){
string name;
cout<<"Enter your name"<<endl;
cin>>name;
cout<<"Hello World"<<endl;
cout<<"Hello "<<name<<endl;
}
Comments
Leave a comment