/ Published in: C++

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#include <iostream> int main() { using namespace std; const int ArSize = 20; char name[ArSize]; char dessert[ArSize]; cout << “Enter your name:\nâ€; cin.getline(name, ArSize); // reads through newline cout << “Enter your favorite dessert:\nâ€; cin.getline(dessert, ArSize); cout << “I have some delicious “ << dessert; cout << “ for you, “ << name << “.\nâ€; return 0; }
Comments
