Generation

generate functionMon, 27 Mar 2023

Create a chatbot that says hello and then says Welcome, after it requests the name of not receiving information, ask again

#include <iostream> int main() { std::string name = ""; while(name.empty()) { std::cout << "Hello, what is your name? "; std::getline (std::cin, name); } std::cout << "Welcome " << name << "!" << std::endl; return 0; }

Want to kickstart your project?Use the new AI Studio to create your code