Write a code that takes a word from user for C using visual

Write a code that  takes a word from user for C++ using visual studios
Write a code that  takes a word from user for C++ using visual studios

Solution

#include <iostream>

using namespace std;

int main()
{
string word;
cout<<\"Enter the word: \";
cin >> word;
cout<<\"Word entered: \"<<word<<endl;

return 0;
}

Output:

sh-4.2$ g++ -o main *.cpp                                                                                                                                                                                                                                              

sh-4.2$ main                                                                                                                                                                                                                                                           

Enter the word: Hello                                                                                                                                                                                                                                                  

Word entered: Hello

 Write a code that takes a word from user for C++ using visual studios Write a code that takes a word from user for C++ using visual studiosSolution#include <

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site