cpp_primer_plus/ch04/02.cpp
2022-08-25 19:01:36 +01:00

20 lines
448 B
C++

# include <iostream>
using namespace std;
int main(){
/** const int ArSize = 20; **/
/** char name[ArSize]; **/
/** char dessert[ArSize]; **/
string name, dessert;
cout << "Enter your name: " ;
// cin.getline(name,ArSize);
getline(cin,name);
cout << "Enter your dessert: " ;
// cin.getline(dessert,ArSize);
getline(cin,dessert);
cout << "I have some delicious " << dessert << " for you, " << name << "." << endl;
return 0;
}