Ask Question

Assume that name has been declared suitably for storing names (like "Misha", "Emily" and "Sofia") Write some code that reads a value into name then prints the message "Greetings, NAME" where NAME is replaced the value that was read into name. For example, if your code read in "Rachel" it would print out "Greetings, Rachel"

+3
Answers (1)
  1. 6 January, 22:53
    0
    void main () {

    string name;

    cout<<"Enter Name";

    cin>>name;

    cout<<"Greetings ";

    cout<
    }

    Explanation:

    in main function we declared a variable called "name". using cin we are reading the value into name and we are printing that name using cout.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Assume that name has been declared suitably for storing names (like "Misha", "Emily" and "Sofia") Write some code that reads a value into ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers