fifth.cpp
来自「C++实践源码」· C++ 代码 · 共 27 行
CPP
27 行
////////////////////////////////////////////////////////////
// Module : fifth.cpp
//
// Purpose : Demonstration of standard input/output using
// cin and cout
////////////////////////////////////////////////////////////
#include <iostream.h>
void main()
{
// Ask the user a question
cout << "Hello, what's your name?\n>";
// Create a place to store up to 25 characters for a name
char fname[25];
char lname[25];
// Get the user's name
cin >> fname >> lname;
// Use the name, writing it to the screen
cout << "Welcome to the world of C++, "
<< fname << " " << lname << "!";
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?