Answer to Question #214193 in C++ for sagar

Question #214193

Write a program to display the output as "Hello World" and "Hello Name" where Name is the input from the user.


1
Expert's answer
2021-07-06T02:08:35-0400
#include<iostream>
using namespace std;
int main(){
	string name;
	cout<<"Enter your name"<<endl;
	cin>>name;
	cout<<"Hello World"<<endl;
	cout<<"Hello  "<<name<<endl;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS